/** * @return NodeCollection|NameNode[] */ public function getExtends() { if (!isset($this->extends)) { return new NodeCollection(); } return $this->extends->getItems(); }
/** * @return NodeCollection|NameNode[] */ public function getImplements() { if (!isset($this->implements)) { return new NodeCollection(); } return $this->implements->getItems(); }
/** * Get the values of the array. * * @param boolean $recursive * (optional) TRUE to get values of array elements that are also arrays. * * @return NodeCollection */ public function getValues($recursive = TRUE) { $values = new NodeCollection(); foreach ($this->elements->getItems() as $element) { if ($element instanceof ArrayPairNode) { $value = $element->getValue(); if ($recursive && $value instanceof ArrayNode) { $values->add($value->getValues($recursive)); } else { $values->add($value); } } else { $values->add($element); } } return $values; }
/** * @return NodeCollection|StaticVariableNode[] */ public function getVariables() { return $this->variables->getItems(); }
/** * @return NodeCollection|ConstantDeclarationNode[] */ public function getDeclarations() { return $this->declarations->getItems(); }
/** * @return NodeCollection|DeclareDirectiveNode[] */ public function getDirectives() { return $this->directives->getItems(); }
/** * @return NodeCollection|LexicalVariableNode[] */ public function getLexicalVariables() { return $this->lexicalVariables->getItems(); }
/** * @return ParameterNodeCollection */ public function getParameters() { $parameters = $this->parameters->getItems()->toArray(); return new ParameterNodeCollection($parameters, FALSE); }
/** * @return NodeCollection|NameNode[] */ public function getTraitNames() { return $this->traitNames->getItems(); }
/** * @return NodeCollection|ClassMemberNode[] */ public function getMembers() { return $this->members->getItems(); }