true, 'parent' => true, 'static' => true, ); /** * Constructs a namespace node. * * @param null|Node\Name $name Name * @param null|Node[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(Node\Name $name = null, $stmts = array(), array $attributes = array()) { parent::__construct(null, $attributes); $this->name = $name; $this->stmts = $stmts; if (isset(self::$specialNames[(string) $this->name])) { throw new Error( sprintf('Cannot use \'%s\' as namespace name', $this->name), $this->name->getAttributes() ); } if (null !== $this->stmts) { foreach ($this->stmts as $stmt) { if ($stmt instanceof self) { throw new Error('Namespace declarations cannot be nested', $stmt->getAttributes()); } } } } public function getSubNodeNames() { return array('name', 'stmts'); } }