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
|
|
|
{
|
2015-02-28 18:44:28 +01:00
|
|
|
/** @var Expr[] List of variables to assign to */
|
|
|
|
public $vars;
|
|
|
|
|
2012-09-07 17:22:43 +02:00
|
|
|
/**
|
|
|
|
* Constructs a list() destructuring node.
|
|
|
|
*
|
2014-02-06 14:44:16 +01:00
|
|
|
* @param Expr[] $vars List of variables to assign to
|
|
|
|
* @param array $attributes Additional attributes
|
2012-09-07 17:22:43 +02:00
|
|
|
*/
|
|
|
|
public function __construct(array $vars, array $attributes = array()) {
|
2015-05-02 22:17:34 +02:00
|
|
|
parent::__construct($attributes);
|
2015-02-28 18:44:28 +01:00
|
|
|
$this->vars = $vars;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSubNodeNames() {
|
|
|
|
return array('vars');
|
2012-09-07 17:22:43 +02:00
|
|
|
}
|
2015-02-28 18:44:28 +01:00
|
|
|
}
|