class Attribute
Same name in this branch
- 11.1.x vendor/phpstan/phpdoc-parser/src/Ast/Attribute.php \PHPStan\PhpDocParser\Ast\Attribute
- 11.1.x vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php \Doctrine\Common\Annotations\Annotation\Attribute
- 11.1.x vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Attribute.php \SlevomatCodingStandard\Helpers\Attribute
- 11.1.x vendor/mck89/peast/lib/Peast/Selector/Node/Part/Attribute.php \Peast\Selector\Node\Part\Attribute
- 11.1.x core/lib/Drupal/Core/Template/Attribute.php \Drupal\Core\Template\Attribute
Hierarchy
- class \PhpParser\NodeAbstract implements \PhpParser\Node, \PhpParser\JsonSerializable
- class \PhpParser\Node\Attribute extends \PhpParser\NodeAbstract
Expanded class hierarchy of Attribute
2 files declare their use of Attribute
- DataProviderHelper.php in vendor/
phpstan/ phpstan-phpunit/ src/ Rules/ PHPUnit/ DataProviderHelper.php - IgnoredLinesFindingVisitor.php in vendor/
phpunit/ php-code-coverage/ src/ StaticAnalysis/ IgnoredLinesFindingVisitor.php
16 string references to 'Attribute'
- Attribute::getType in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Attribute.php - Gets the type of the node.
- AttributeClassLoader::supports in vendor/
symfony/ routing/ Loader/ AttributeClassLoader.php - AttributeDirectoryLoader::supports in vendor/
symfony/ routing/ Loader/ AttributeDirectoryLoader.php - AttributeFileLoader::supports in vendor/
symfony/ routing/ Loader/ AttributeFileLoader.php - claro_preprocess_input in core/
themes/ claro/ claro.theme - Implements template_preprocess_HOOK() for input.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Attribute.php, line 8
Namespace
PhpParser\NodeView source
class Attribute extends NodeAbstract {
/** @var Name Attribute name */
public Name $name;
/** @var list<Arg> Attribute arguments */
public array $args;
/**
* @param Node\Name $name Attribute name
* @param list<Arg> $args Attribute arguments
* @param array<string, mixed> $attributes Additional node attributes
*/
public function __construct(Name $name, array $args = [], array $attributes = []) {
$this->attributes = $attributes;
$this->name = $name;
$this->args = $args;
}
public function getSubNodeNames() : array {
return [
'name',
'args',
];
}
public function getType() : string {
return 'Attribute';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
Attribute::$args | public | property | @var list<Arg> Attribute arguments | |
Attribute::$name | public | property | @var Name Attribute name | |
Attribute::getSubNodeNames | public | function | Gets the names of the sub nodes. | Overrides Node::getSubNodeNames |
Attribute::getType | public | function | Gets the type of the node. | Overrides Node::getType |
Attribute::__construct | public | function | Overrides NodeAbstract::__construct | |
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 |