/** * @param string $name * @param string $source * @param string $comment */ public function __construct($name, $source = '', $comment = '') { parent::__construct($name); $this->parameters = new ParameterAggregator([]); $this->initSource($source); $this->initComment($comment); }
/** * @param string $name * @param string $comment */ public function __construct($name = '', $comment = '') { parent::__construct($name); //todo: Function declaration $this->elements = new DeclarationAggregator([ClassDeclaration::class, DocComment::class, Source::class]); $this->initComment($comment); }
/** * @param string $name * @param string $extends * @param array $interfaces * @param string $comment * @throws ReactorException When name is invalid. */ public function __construct($name, $extends = '', array $interfaces = [], $comment = '') { parent::__construct($name); if (!empty($extends)) { $this->setExtends($extends); } $this->setInterfaces($interfaces); $this->initComment($comment); $this->constants = new ConstantAggregator([]); $this->properties = new PropertyAggregator([]); $this->methods = new MethodAggregator([]); }
/** * @param string $name * @param null $defaultValue * @param string $comment */ public function __construct($name, $defaultValue = null, $comment = '') { parent::__construct($name); $this->setDefault($defaultValue); $this->initComment($comment); }
/** * @param string $name * @param string $value * @param string|array $comment */ public function __construct($name, $value, $comment = '') { parent::__construct($name); $this->value = $value; $this->initComment($comment); }