PHP Класс PDepend\Source\Language\PHP\PHPParserVersion70

TODO: - Tokens: trait, callable, insteadof - allowed as - method - constant - not allowed as - class - interface - trait
С версии: 2.3
Наследование: extends PHPParserVersion56
Показать файл Открыть проект Примеры использования класса

Защищенные методы

Метод Описание
isMethodName ( integer $tokenType ) : boolean
parseAllocationExpressionTypeReference ( PDepend\Source\AST\ASTAllocationExpression $allocation ) : PDepend\Source\AST\ASTNode Parse the type reference used in an allocation expression.
parseAnonymousClassDeclaration ( PDepend\Source\AST\ASTAllocationExpression $allocation ) : null | ASTAnonymousClass Attempts to the next sequence of tokens as an anonymous class and adds it to the allocation expression
parseCallableDeclarationAddition ( PDepend\Source\AST\AbstractASTCallable $callable ) : PDepend\Source\AST\AbstractASTCallable
parseExpressionVersion70 ( ) : PDepend\Source\AST\ASTNode In this method we implement parsing of PHP 7.0 specific expressions.
parseFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter This method will parse a formal parameter. A formal parameter is at least a variable name, but can also contain a default parameter value.
parseOptionalExpressionForVersion ( ) : PDepend\Source\AST\ASTNode This method will be called when the base parser cannot handle an expression in the base version. In this method you can implement version specific expressions.
parseReturnTypeHint ( ) : PDepend\Source\AST\ASTType
parseTypeHint ( ) : PDepend\Source\AST\ASTNode Parses a type hint that is valid in the supported PHP version.

Приватные методы

Метод Описание
isScalarOrCallableTypeHint ( string $image ) : boolean Tests if the given image is a PHP 7 type hint.
parseScalarOrCallableTypeHint ( string $image ) : PDepend\Source\AST\ASTType Parses a scalar type hint or a callable type hint.

Описание методов

isMethodName() защищенный Метод

protected isMethodName ( integer $tokenType ) : boolean
$tokenType integer
Результат boolean

parseAllocationExpressionTypeReference() защищенный Метод

Parse the type reference used in an allocation expression.
С версии: 2.3
protected parseAllocationExpressionTypeReference ( PDepend\Source\AST\ASTAllocationExpression $allocation ) : PDepend\Source\AST\ASTNode
$allocation PDepend\Source\AST\ASTAllocationExpression
Результат PDepend\Source\AST\ASTNode

parseAnonymousClassDeclaration() защищенный Метод

Attempts to the next sequence of tokens as an anonymous class and adds it to the allocation expression
protected parseAnonymousClassDeclaration ( PDepend\Source\AST\ASTAllocationExpression $allocation ) : null | ASTAnonymousClass
$allocation PDepend\Source\AST\ASTAllocationExpression
Результат null | PDepend\Source\AST\ASTAnonymousClass

parseCallableDeclarationAddition() защищенный Метод

protected parseCallableDeclarationAddition ( PDepend\Source\AST\AbstractASTCallable $callable ) : PDepend\Source\AST\AbstractASTCallable
$callable PDepend\Source\AST\AbstractASTCallable
Результат PDepend\Source\AST\AbstractASTCallable

parseExpressionVersion70() защищенный Метод

In this method we implement parsing of PHP 7.0 specific expressions.
С версии: 2.3
protected parseExpressionVersion70 ( ) : PDepend\Source\AST\ASTNode
Результат PDepend\Source\AST\ASTNode

parseFormalParameter() защищенный Метод

-- ------- function foo(Bar $x, $y = 42) } -- -------
С версии: 2.0.7
protected parseFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter
Результат PDepend\Source\AST\ASTFormalParameter

parseOptionalExpressionForVersion() защищенный Метод

This method will be called when the base parser cannot handle an expression in the base version. In this method you can implement version specific expressions.
С версии: 2.3
protected parseOptionalExpressionForVersion ( ) : PDepend\Source\AST\ASTNode
Результат PDepend\Source\AST\ASTNode

parseReturnTypeHint() защищенный Метод

protected parseReturnTypeHint ( ) : PDepend\Source\AST\ASTType
Результат PDepend\Source\AST\ASTType

parseTypeHint() защищенный Метод

Parses a type hint that is valid in the supported PHP version.
С версии: 2.3
protected parseTypeHint ( ) : PDepend\Source\AST\ASTNode
Результат PDepend\Source\AST\ASTNode