Ejemplo n.º 1
0
 public function __construct($propertyName, $type)
 {
     $functionName = 'get' . ucfirst($propertyName);
     parent::__construct($functionName, 'public');
     $this->returns('string');
     $this->addBodyLine('return $this->' . $propertyName . ';');
 }
Ejemplo n.º 2
0
 public function __construct($variables)
 {
     parent::__construct('__construct', 'public');
     foreach ($variables as $name => $type) {
         $this->addVariable($name, $type);
         $this->addBodyLine('$this->' . $name . ' = $' . $name . ';');
     }
 }