Lines Matching refs:this

94         $this->lexer = $lexer;
95 $this->parser = $parser;
96 $this->pageSqlString = $sql;
98 $this->requestedPage = MarkupPath::createPageFromPathObject(ExecutionContext::getActualOrCreateFromEnv()->getContextPath());
100 $this->requestedPage = $pageContext;
116 $this->physicalSql .= "select\n\t*\n";
134 $this->physicalSql .= "from\n\tpages\n";
137 switch ($this->ruleState) {
140 if (substr($this->physicalSql, -1) === "\n") {
141 $this->physicalSql .= "\t";
166 $this->actualPredicateColumn = $variableName;
167 if ($this->tableName === self::BACKLINKS) {
173 $this->physicalSql .= "{$variableName} ";
177 if ($this->tableName === self::BACKLINKS) {
180 $this->physicalSql .= "\t{$variableName} ";
183 $this->columns[] = $text;
195 switch ($this->ruleState) {
197 $this->physicalSql .= "{$text} ";
201 $this->physicalSql .= "\trandom()";
204 $this->physicalSql .= "date('now')";
207 switch ($this->ruleState) {
218 $this->parameters[] = $text;
219 $this->physicalSql .= "?";
225 if ($this->ruleState === PageSqlParser::RULE_predicates) {
226 $this->physicalSql .= " {$text}\n";
231 $this->physicalSql .= "{$text} ";
237 $this->physicalSql .= "{$text}";
240 switch ($this->ruleState) {
244 $this->physicalSql .= "{$text}\n";
247 $this->physicalSql .= "{$text}";
251 $this->physicalSql .= " {$text} ";
254 switch ($this->ruleState) {
256 $this->physicalSql .= "{$text}";
259 switch ($this->actualPredicateColumn) {
261 if ($this->requestedPage !== null) {
262 $level = PageLevel::createForPage($this->requestedPage)->getValue();
270 $this->parameters[] = $predicateValue + $level;
273 $this->parameters[] = $text;
279 $this->parameters[] = DataType::toFloat($text);
281 $this->parameters[] = DataType::toInteger($text);
284 LogUtility::error("The value of the column $this->actualPredicateColumn ($text) could not be transformed as a number. Error: {$e->getMessage()}", self::CANONICAL);
285 $this->parameters[] = $text;
289 $this->physicalSql .= "?";
292 $this->physicalSql .= "{$text} ";
305 $textMakingTheError = $node->getText(); // $this->lexer->getText();
309 $position .= ", in `" . substr($this->pageSqlString, $charPosition, -1) . "`";
332 $this->ruleState = $ruleIndex;
336 $this->physicalSql .= "order by\n";
339 $this->physicalSql .= "from\n";
345 switch ($this->tableName) {
347 $this->physicalSql .= "\tand ";
350 $this->physicalSql .= "\tand (";
353 $this->physicalSql .= "where\n";
360 $this->physicalSql .= $ctx->getText();
365 $this->tableName = $tableName;
376 if ($this->requestedPage !== null) {
377 $this->parameters[] = $this->requestedPage->getPathObject()->toAbsoluteId();
380 $this->parameters[] = "unknown page";
384 if ($this->requestedPage !== null) {
386 if (!$this->requestedPage->isIndexPage()) {
390 $path = $this->requestedPage->getPathObject();
391 $this->parameters[] = $path->toAbsoluteId();
398 $this->parameters[] = $likePredicatequery;
399 $level = PageLevel::createForPage($this->requestedPage)->getValue();
400 $this->parameters[] = $level;
404 $this->parameters[] = "";
405 $this->parameters[] = "";
406 $this->parameters[] = "";
414 $this->physicalSql .= $tableName;
435 $this->physicalSql .= "\n";
438 if ($this->tableName == self::DESCENDANTS) {
439 $this->physicalSql .= ")";
441 $this->physicalSql .= "\n";
450 return $this->parameters;
456 return $this->columns;
461 return $this->tableName;
472 $ruleNames = $this->parser->getRuleNames();
485 return $this->lexer->getVocabulary()->getSymbolicName($token->getType());
491 return $this->physicalSql;