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