示例#1
0
 /**
  * @return NodeCollection|NameNode[]
  */
 public function getExtends()
 {
     if (!isset($this->extends)) {
         return new NodeCollection();
     }
     return $this->extends->getItems();
 }
示例#2
0
 /**
  * @return NodeCollection|NameNode[]
  */
 public function getImplements()
 {
     if (!isset($this->implements)) {
         return new NodeCollection();
     }
     return $this->implements->getItems();
 }
示例#3
0
 /**
  * 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();
 }
示例#6
0
 /**
  * @return NodeCollection|DeclareDirectiveNode[]
  */
 public function getDirectives()
 {
     return $this->directives->getItems();
 }
示例#7
0
 /**
  * @return NodeCollection|LexicalVariableNode[]
  */
 public function getLexicalVariables()
 {
     return $this->lexicalVariables->getItems();
 }
示例#8
0
 /**
  * @return ParameterNodeCollection
  */
 public function getParameters()
 {
     $parameters = $this->parameters->getItems()->toArray();
     return new ParameterNodeCollection($parameters, FALSE);
 }
示例#9
0
 /**
  * @return NodeCollection|NameNode[]
  */
 public function getTraitNames()
 {
     return $this->traitNames->getItems();
 }
示例#10
0
 /**
  * @return NodeCollection|ClassMemberNode[]
  */
 public function getMembers()
 {
     return $this->members->getItems();
 }