From 2a7a72b3f90852c1d02e11ea4888e26817845a53 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 27 Jul 2010 01:19:51 -0300 Subject: [PATCH] Reverted extensibility of Lexer. This is not ideal. --- lib/Doctrine/ORM/Query/Lexer.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Lexer.php b/lib/Doctrine/ORM/Query/Lexer.php index a9ae56db9..3ef68f18c 100644 --- a/lib/Doctrine/ORM/Query/Lexer.php +++ b/lib/Doctrine/ORM/Query/Lexer.php @@ -151,7 +151,7 @@ class Lexer extends \Doctrine\Common\Lexer $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2)); return self::T_STRING; } else if (ctype_alpha($value[0]) || $value[0] === '_') { - $name = $this->getLexerClassName() . '::T_' . strtoupper($value); + $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); if (defined($name)) { $type = constant($name); if ($type > 100) { @@ -172,7 +172,7 @@ class Lexer extends \Doctrine\Common\Lexer case '<': return self::T_LOWER_THAN; case '+': return self::T_PLUS; case '-': return self::T_MINUS; - case '*': return self::T_MULTIPLY; + case '*': return self::Ts_MULTIPLY; case '/': return self::T_DIVIDE; case '!': return self::T_NEGATE; case '{': return self::T_OPEN_CURLY_BRACE; @@ -185,14 +185,4 @@ class Lexer extends \Doctrine\Common\Lexer return $type; } - - /** - * Retrieve the class name (allows extensibility through Late Static Binding) - * - * @return string This class name - */ - protected function getLexerClassName() - { - return __CLASS__; - } } \ No newline at end of file