コード例 #1
0
ファイル: MethodDeclaration.php プロジェクト: vvval/spiral
 /**
  * @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
ファイル: NamespaceDeclaration.php プロジェクト: vvval/spiral
 /**
  * @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
ファイル: ClassDeclaration.php プロジェクト: vvval/spiral
 /**
  * {@inheritdoc}
  */
 public function setName($name)
 {
     return parent::setName(Inflector::classify($name));
 }
コード例 #4
0
ファイル: PropertyDeclaration.php プロジェクト: vvval/spiral
 /**
  * @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
ファイル: ConstantDeclaration.php プロジェクト: vvval/spiral
 /**
  * {@inheritdoc}
  */
 public function setName($name)
 {
     return parent::setName(strtoupper(Inflector::tableize($name)));
 }
コード例 #6
0
ファイル: ParameterDeclaration.php プロジェクト: vvval/spiral
 /**
  * {@inheritdoc}
  */
 public function setName($name)
 {
     return parent::setName(Inflector::camelize($name));
 }