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
|
|
|
{
|
2016-07-09 21:54:15 +02:00
|
|
|
/** @var ArrayItem[] List of items to assign to */
|
|
|
|
public $items;
|
2015-02-28 18:44:28 +01:00
|
|
|
|
2012-09-07 17:22:43 +02:00
|
|
|
/**
|
|
|
|
* Constructs a list() destructuring node.
|
|
|
|
*
|
2016-07-09 21:54:15 +02:00
|
|
|
* @param ArrayItem[] $items List of items to assign to
|
|
|
|
* @param array $attributes Additional attributes
|
2012-09-07 17:22:43 +02:00
|
|
|
*/
|
2016-07-09 21:54:15 +02:00
|
|
|
public function __construct(array $items, array $attributes = array()) {
|
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 {
|
2016-07-09 21:54:15 +02:00
|
|
|
return array('items');
|
2012-09-07 17:22:43 +02:00
|
|
|
}
|
2015-02-28 18:44:28 +01:00
|
|
|
}
|