public function parse($input, array $aliases = array())
    {
        if (0 !== strpos(ltrim($input), '/**')) {
            return array();
        }

        if (false == ($position = strpos($input, '@'))) {
            return array();
        }

        if (0 < $position) {
            $position -= 1;
        }

        $input = substr($input, $position);
        $input = trim($input, '*/ ');

        $this->aliases = $aliases;

        $this->lexer->setInput($input);
        $this->lexer->moveNext();

        return $this->getAnnotations();
    }
public function parse($input, array $aliases = array())
    {
        if (0 !== strpos(ltrim($input), '/**')) {
            return array();
        }

        if (false == ($position = strpos($input, '@'))) {
            return array();
        }

        if (0 < $position) {
            $position -= 1;
        }

        $input = substr($input, $position);
        $input = trim($input, '*/ ');

        $this->aliases = $aliases;

        $this->lexer->setInput($input);
        $this->lexer->moveNext();

        return $this->getAnnotations();
    }
public function parse ( $ input , array $ aliases = array ( ) ) { if ( 0 !== strpos ( ltrim ( $ input ) , '/**' ) ) { return array ( ) ; } if ( false == ( $ position = strpos ( $ input , '@' ) ) ) { return array ( ) ; } if ( 0 < $ position ) { $ position -= 1 ; } $ input = substr ( $ input , $ position ) ; $ input = trim ( $ input , '*/ ' ) ; $ this -> aliases = $ aliases ; $ this -> lexer -> setInput ( $ input ) ; $ this -> lexer -> moveNext ( ) ; return $ this -> getAnnotations ( ) ; }
Parses the docblock and returns its annotation tokens.

@param string $input   The docblock.
@param array  $aliases The namespace aliases.

@return array The list of tokens.
Parses the docblock and returns its annotation tokens .