class Arg
Hierarchy
- class \PhpParser\NodeAbstract implements \PhpParser\Node, \PhpParser\JsonSerializable
- class \PhpParser\Node\Arg extends \PhpParser\NodeAbstract
Expanded class hierarchy of Arg
9 files declare their use of Arg
- AssertTypeSpecifyingExtensionHelper.php in vendor/
phpstan/ phpstan-phpunit/ src/ Type/ PHPUnit/ Assert/ AssertTypeSpecifyingExtensionHelper.php - BuilderFactory.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ BuilderFactory.php - CallLike.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ CallLike.php - MethodCall.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ MethodCall.php - New_.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ New_.php
2 string references to 'Arg'
- Arg::getType in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Arg.php - Gets the type of the node.
- ExpressionLanguageProvider::getFunctions in vendor/
symfony/ dependency-injection/ ExpressionLanguageProvider.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Arg.php, line 7
Namespace
PhpParser\NodeView source
class Arg extends NodeAbstract {
/** @var Identifier|null Parameter name (for named parameters) */
public ?Identifier $name;
/** @var Expr Value to pass */
public Expr $value;
/** @var bool Whether to pass by ref */
public bool $byRef;
/** @var bool Whether to unpack the argument */
public bool $unpack;
/**
* Constructs a function call argument node.
*
* @param Expr $value Value to pass
* @param bool $byRef Whether to pass by ref
* @param bool $unpack Whether to unpack the argument
* @param array<string, mixed> $attributes Additional attributes
* @param Identifier|null $name Parameter name (for named parameters)
*/
public function __construct(Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], ?Identifier $name = null) {
$this->attributes = $attributes;
$this->name = $name;
$this->value = $value;
$this->byRef = $byRef;
$this->unpack = $unpack;
}
public function getSubNodeNames() : array {
return [
'name',
'value',
'byRef',
'unpack',
];
}
public function getType() : string {
return 'Arg';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
Arg::$byRef | public | property | @var bool Whether to pass by ref | |
Arg::$name | public | property | @var Identifier|null Parameter name (for named parameters) | |
Arg::$unpack | public | property | @var bool Whether to unpack the argument | |
Arg::$value | public | property | @var Expr Value to pass | |
Arg::getSubNodeNames | public | function | Gets the names of the sub nodes. | Overrides Node::getSubNodeNames |
Arg::getType | public | function | Gets the type of the node. | Overrides Node::getType |
Arg::__construct | public | function | Constructs a function call argument node. | 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 |