Zend\Code\Generator\ClassGenerator::setDocBlock PHP Method

setDocBlock() public method

public setDocBlock ( Zend\Code\Generator\DocBlockGenerator $docBlock ) : self
$docBlock Zend\Code\Generator\DocBlockGenerator
return self
    public function setDocBlock(DocBlockGenerator $docBlock)
    {
        $this->docBlock = $docBlock;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @param \Jungle\Syntax $syntax
  * @param \Jungle\SLR\Table $table
  *
  * @return \Zend\Code\Generator\ClassGenerator
  */
 public function build(Syntax $syntax, Table $table)
 {
     $this->class = new ClassGenerator('Test');
     $this->class->setDocBlock(new DocBlockGenerator('SLR parser', 'WARNING! THIS FILE AUTO GENERATED by JUNGLE. DO NOT EDIT IT!'));
     $this->class->addPropertyFromGenerator($this->getActionTableProperty($table));
     $this->class->addPropertyFromGenerator($this->getStackProperty());
     $this->buildParseMethod();
     $this->buildTokenizerMethod($syntax);
     $this->buildGetNextTokenMethod($syntax);
     $this->buildReduces($table->getReduces());
     return $this->class;
 }
All Usage Examples Of Zend\Code\Generator\ClassGenerator::setDocBlock