class MatchArm
Hierarchy
- class \PhpParser\NodeAbstract implements \PhpParser\Node, \PhpParser\JsonSerializable
- class \PhpParser\Node\MatchArm extends \PhpParser\NodeAbstract
Expanded class hierarchy of MatchArm
2 files declare their use of MatchArm
- Match_.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ Match_.php - PrettyPrinterAbstract.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php
1 string reference to 'MatchArm'
- MatchArm::getType in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ MatchArm.php - Gets the type of the node.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ MatchArm.php, line 8
Namespace
PhpParser\NodeView source
class MatchArm extends NodeAbstract {
/** @var null|list<Node\Expr> */
public ?array $conds;
/** @var Node\Expr */
public Expr $body;
/**
* @param null|list<Node\Expr> $conds
*/
public function __construct(?array $conds, Node\Expr $body, array $attributes = []) {
$this->conds = $conds;
$this->body = $body;
$this->attributes = $attributes;
}
public function getSubNodeNames() : array {
return [
'conds',
'body',
];
}
public function getType() : string {
return 'MatchArm';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
MatchArm::$body | public | property | @var Node\Expr | |
MatchArm::$conds | public | property | @var null|list<Node\Expr> | |
MatchArm::getSubNodeNames | public | function | Gets the names of the sub nodes. | Overrides Node::getSubNodeNames |
MatchArm::getType | public | function | Gets the type of the node. | Overrides Node::getType |
MatchArm::__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 |