class Array_
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php \PhpParser\Node\Expr\Cast\Array_
- 11.1.x vendor/phpdocumentor/type-resolver/src/Types/Array_.php \phpDocumentor\Reflection\Types\Array_
Hierarchy
- class \PhpParser\NodeAbstract implements \PhpParser\Node, \PhpParser\JsonSerializable
Expanded class hierarchy of Array_
2 files declare their use of Array_
- NodeDumper.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ NodeDumper.php - ParserAbstract.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ Array_.php, line 8
Namespace
PhpParser\Node\ExprView source
class Array_ extends Expr {
// For use in "kind" attribute
public const KIND_LONG = 1;
// array() syntax
public const KIND_SHORT = 2;
// [] syntax
/** @var ArrayItem[] Items */
public array $items;
/**
* Constructs an array node.
*
* @param ArrayItem[] $items Items of the array
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(array $items = [], array $attributes = []) {
$this->attributes = $attributes;
$this->items = $items;
}
public function getSubNodeNames() : array {
return [
'items',
];
}
public function getType() : string {
return 'Expr_Array';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Array_::$items | public | property | @var ArrayItem[] Items |
Array_::getSubNodeNames | public | function | |
Array_::getType | public | function | |
Array_::KIND_LONG | public | constant | |
Array_::KIND_SHORT | public | constant | |
Array_::__construct | public | function | Constructs an array node. |