writeFile() protected method

protected writeFile ( ) : integer | boolean
return integer | boolean
Esempio n. 1
0
 /**
  * @see \WsdlToPhp\PackageGenerator\File\AbstractFile::writeFile()
  * @return int|bool
  */
 public function writeFile()
 {
     $this->addMainAnnotationBlock()->addAutoload()->addOptionsAnnotationBlock()->addOptions()->addContent();
     return parent::writeFile();
 }
 /**
  * @see \WsdlToPhp\PackageGenerator\File\AbstractFile::writeFile()
  * @param bool $withSrc
  * @return int|bool
  */
 public function writeFile($withSrc = true)
 {
     if (!$this->getModel() instanceof AbstractModel) {
         throw new \InvalidArgumentException('You MUST define the model before begin able to generate the file', __LINE__);
     }
     GeneratorUtils::createDirectory($this->getFileDestination($withSrc));
     $this->defineNamespace()->defineUseStatement()->addAnnotationBlock()->addClassElement();
     return parent::writeFile();
 }