WsdlToPhp\PackageGenerator\Generator\Utils::createDirectory PHP Method

createDirectory() public static method

public static createDirectory ( string $directory, integer $permissions = 509 ) : boolean
$directory string
$permissions integer
return boolean
    public static function createDirectory($directory, $permissions = 0775)
    {
        if (!is_dir($directory)) {
            mkdir($directory, $permissions, true);
        }
        return true;
    }

Usage Example

コード例 #1
0
 /**
  * @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();
 }
All Usage Examples Of WsdlToPhp\PackageGenerator\Generator\Utils::createDirectory