class VarLikeIdentifier
Represents a name that is written in source code with a leading dollar, but is not a proper variable. The leading dollar is not stored as part of the name.
Examples: Names in property declarations are formatted as variables. Names in static property lookups are also formatted as variables.
Hierarchy
- class \PhpParser\NodeAbstract implements \PhpParser\Node, \PhpParser\JsonSerializable
- class \PhpParser\Node\Identifier extends \PhpParser\NodeAbstract
- class \PhpParser\Node\VarLikeIdentifier extends \PhpParser\Node\Identifier
- class \PhpParser\Node\Identifier extends \PhpParser\NodeAbstract
Expanded class hierarchy of VarLikeIdentifier
1 file declares its use of VarLikeIdentifier
- StaticPropertyFetch.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ StaticPropertyFetch.php
1 string reference to 'VarLikeIdentifier'
- VarLikeIdentifier::getType in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ VarLikeIdentifier.php - Gets the type of the node.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ VarLikeIdentifier.php, line 12
Namespace
PhpParser\NodeView source
class VarLikeIdentifier extends Identifier {
public function getType() : string {
return 'VarLikeIdentifier';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
Identifier::$name | public | property | @psalm-var non-empty-string | |
Identifier::$specialClassNames | private static | property | @var array<string, bool> | |
Identifier::getSubNodeNames | public | function | Gets the names of the sub nodes. | Overrides Node::getSubNodeNames |
Identifier::isSpecialClassName | public | function | Checks whether the identifier is a special class name (self, parent or static). | |
Identifier::toLowerString | public | function | Get lowercased identifier as string. | |
Identifier::toString | public | function | Get identifier as string. | |
Identifier::__construct | public | function | Constructs an identifier node. | Overrides NodeAbstract::__construct |
Identifier::__toString | public | function | Get identifier as string. | |
NodeAbstract::$attributes | protected | property | @var array<string, mixed> Attributes | |
NodeAbstract::getAttribute | public | function | Returns the value of an attribute. | Overrides Node::getAttribute |
NodeAbstract::getAttributes | public | function | Returns all the attributes of this node. | Overrides Node::getAttributes |
NodeAbstract::getComments | public | function | Gets all comments directly preceding this node. | Overrides Node::getComments |
NodeAbstract::getDocComment | public | function | Gets the doc comment of the node. | Overrides Node::getDocComment |
NodeAbstract::getEndFilePos | public | function | Gets the file offset of the last character that is part of this node. | Overrides Node::getEndFilePos |
NodeAbstract::getEndLine | public | function | Gets the line the node ended in. | Overrides Node::getEndLine |
NodeAbstract::getEndTokenPos | public | function | Gets the token offset of the last token that is part of this node. | Overrides Node::getEndTokenPos |
NodeAbstract::getLine | public | function | Gets line the node started in (alias of getStartLine). | Overrides Node::getLine |
NodeAbstract::getStartFilePos | public | function | Gets the file offset of the first character that is part of this node. | Overrides Node::getStartFilePos |
NodeAbstract::getStartLine | public | function | Gets line the node started in. | Overrides Node::getStartLine |
NodeAbstract::getStartTokenPos | public | function | Gets the token offset of the first token that is part of this node. | Overrides Node::getStartTokenPos |
NodeAbstract::hasAttribute | public | function | Returns whether an attribute exists. | Overrides Node::hasAttribute |
NodeAbstract::jsonSerialize | public | function | ||
NodeAbstract::setAttribute | public | function | Sets an attribute on a node. | Overrides Node::setAttribute |
NodeAbstract::setAttributes | public | function | Replaces all the attributes of this node. | Overrides Node::setAttributes |
NodeAbstract::setDocComment | public | function | Sets the doc comment of the node. | Overrides Node::setDocComment |
VarLikeIdentifier::getType | public | function | Gets the type of the node. | Overrides Identifier::getType |