Пример #1
0
 /**
  * This methods is respsible for generating a statement array in the correct
  * order and to include all method and property nodes
  */
 public function updateStmts()
 {
     $stmts = array();
     $properties = array();
     $methods = array();
     foreach ($this->methods as $method) {
         $methods[$method->getName()] = $method->getNode();
     }
     foreach ($this->properties as $property) {
         $properties[$property->getName()] = $property->getNode();
     }
     //ksort($properties);
     //ksort($methods);
     foreach ($this->constants as $name => $value) {
         $stmts[] = Tx_PhpParser_Parser_NodeFactory::buildClassConstantNode($name, $value);
     }
     foreach ($properties as $property) {
         $stmts[] = $property;
     }
     foreach ($methods as $method) {
         $stmts[] = $method;
     }
     $this->node->setStmts($stmts);
 }