示例#1
0
 /**
  * @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);
 }
示例#2
0
 /**
  * @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);
 }
示例#3
0
 /**
  * @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([]);
 }
示例#4
0
 /**
  * @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);
 }
示例#5
0
 /**
  * @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);
 }