Esempio n. 1
0
 /**
  * @return ClassBuilderProperty
  */
 public function createPropertyIfNotExists($propertyName, Type $type = NULL)
 {
     if ($this->classBuilder->hasProperty($propertyName)) {
         return $this->classBuilder->getProperty($propertyName);
     } else {
         return $this->classBuilder->addProperty($propertyName, $type);
     }
 }
Esempio n. 2
0
 /**
  * 
  * Hilfsfunktion zum ermöglichen von geilen chainables:
  * 
  *  $cb = new ClassBuilder();
  *  $cb->addProperty('eins')->setType('MyType1')->addProperty('zwei'->setType('MyType2')
  * 
  * usw
  */
 public function addProperty($name)
 {
     return $this->builder->addProperty($name);
 }