2012-09-07 17:22:43 +02:00
|
|
|
<?php
|
|
|
|
|
2014-02-06 14:44:16 +01:00
|
|
|
namespace PhpParser\Node\Expr;
|
|
|
|
|
|
|
|
use PhpParser\Node\Expr;
|
|
|
|
|
|
|
|
class List_ extends Expr
|
2012-09-07 17:22:43 +02:00
|
|
|
{
|
2017-05-07 19:55:29 +02:00
|
|
|
/** @var (ArrayItem|null)[] List of items to assign to */
|
2016-07-09 21:54:15 +02:00
|
|
|
public $items;
|
2015-02-28 18:44:28 +01:00
|
|
|
|
2012-09-07 17:22:43 +02:00
|
|
|
/**
|
|
|
|
* Constructs a list() destructuring node.
|
|
|
|
*
|
2017-05-07 19:55:29 +02:00
|
|
|
* @param (ArrayItem|null)[] $items List of items to assign to
|
|
|
|
* @param array $attributes Additional attributes
|
2012-09-07 17:22:43 +02:00
|
|
|
*/
|
2017-08-13 14:06:08 +02:00
|
|
|
public function __construct(array $items, array $attributes = []) {
|
2015-05-02 22:17:34 +02:00
|
|
|
parent::__construct($attributes);
|
2016-07-09 21:54:15 +02:00
|
|
|
$this->items = $items;
|
2015-02-28 18:44:28 +01:00
|
|
|
}
|
|
|
|
|
2017-04-28 21:40:59 +02:00
|
|
|
public function getSubNodeNames() : array {
|
2017-08-13 14:06:08 +02:00
|
|
|
return ['items'];
|
2012-09-07 17:22:43 +02:00
|
|
|
}
|
2015-02-28 18:44:28 +01:00
|
|
|
}
|