Files
apimacro/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php

34 lines
822 B
PHP
Raw Normal View History

2024-05-07 12:17:25 +02:00
<?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node\Expr;
2024-05-17 12:24:19 +00:00
class ArrayDimFetch extends Expr {
2024-05-07 12:17:25 +02:00
/** @var Expr Variable */
2024-05-17 12:24:19 +00:00
public Expr $var;
2024-05-07 12:17:25 +02:00
/** @var null|Expr Array index / dim */
2024-05-17 12:24:19 +00:00
public ?Expr $dim;
2024-05-07 12:17:25 +02:00
/**
* Constructs an array index fetch node.
*
2024-05-17 12:24:19 +00:00
* @param Expr $var Variable
* @param null|Expr $dim Array index / dim
* @param array<string, mixed> $attributes Additional attributes
2024-05-07 12:17:25 +02:00
*/
2024-05-17 12:24:19 +00:00
public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) {
2024-05-07 12:17:25 +02:00
$this->attributes = $attributes;
$this->var = $var;
$this->dim = $dim;
}
2024-05-17 12:24:19 +00:00
public function getSubNodeNames(): array {
2024-05-07 12:17:25 +02:00
return ['var', 'dim'];
}
2024-05-17 12:24:19 +00:00
public function getType(): string {
2024-05-07 12:17:25 +02:00
return 'Expr_ArrayDimFetch';
}
}