1
0
mirror of synced 2025-01-18 22:41:43 +03:00

[2.0] Removed requirement to extend the Annotation base class, allowing any PHP class with an appropriate constructor to be used as an annotation.

This commit is contained in:
romanb 2010-03-15 14:14:35 +00:00
parent bc6714c2c8
commit ed94a34f6e

View File

@ -149,7 +149,6 @@ class Parser
if ( ! ($this->_lexer->lookahead['type'] === $token)) {
$this->syntaxError($this->_lexer->getLiteral($token));
}
$this->_lexer->moveNext();
}
@ -254,8 +253,7 @@ class Parser
(! $this->_isNestedAnnotation && $this->_lexer->lookahead != null &&
! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) &&
! $this->_lexer->isNextToken(Lexer::T_AT)) ||
! class_exists($name, false) ||
! is_subclass_of($name, 'Doctrine\Common\Annotations\Annotation')
! class_exists($name, false)
) {
$this->_lexer->skipUntil(Lexer::T_AT);