From: <var...@us...> - 2016-01-11 20:10:14
|
Revision: 9762 http://sourceforge.net/p/phpwiki/code/9762 Author: vargenau Date: 2016-01-11 20:10:12 +0000 (Mon, 11 Jan 2016) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/SemanticWeb.php trunk/lib/TextSearchQuery.php Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2016-01-07 17:53:40 UTC (rev 9761) +++ trunk/lib/SemanticWeb.php 2016-01-11 20:10:12 UTC (rev 9762) @@ -285,20 +285,13 @@ class SemanticAttributeSearchQuery extends NumericSearchQuery { - /* - public $base_units = array('m' => explode(',','km,miles,cm,dm,mm,ft,inch,inches,meter'), - 'm^2' => explode(',','km^2,ha,cm^2,mi^2'), - 'm^3' => explode(',','km^3,lit,cm^3,dm^3,gallons'), - ); - */ - /** * We need to detect units from the freetext query: * population > 1 million */ function __construct($search_query, $placeholders, $unit = '') { - $this->NumericSearchQuery($search_query, $placeholders); + parent::__construct($search_query, $placeholders); $this->_units = new Units(); $this->unit = $unit; } Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2016-01-07 17:53:40 UTC (rev 9761) +++ trunk/lib/TextSearchQuery.php 2016-01-11 20:10:12 UTC (rev 9762) @@ -367,7 +367,7 @@ * @param $placeholders array or string All placeholders in the query must be defined * here, and will be replaced by the matcher. */ - public function NumericSearchQuery($search_query, $placeholders) + function __construct($search_query, $placeholders) { // added some basic security checks against user input $this->_query = $search_query; @@ -802,7 +802,7 @@ public $op = "NOT"; public $_op = TSQ_TOK_NOT; - function TextSearchQuery_node_not($leaf) + function __construct($leaf) { $this->leaves = array($leaf); } @@ -1141,8 +1141,7 @@ class TextSearchQuery_Lexer { - function TextSearchQuery_Lexer($query_str, $case_exact = false, - $regex = TSQ_REGEX_AUTO) + function __construct($query_str, $case_exact = false, $regex = TSQ_REGEX_AUTO) { $this->tokens = $this->tokenize($query_str, $case_exact, $regex); $this->query_str = $query_str; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |