Goetas\Xsd\XsdToPhp\Php\Structure\PHPClass::getNamespace PHP Method

getNamespace() public method

public getNamespace ( )
    public function getNamespace()
    {
        return $this->namespace;
    }

Usage Example

Exemplo n.º 1
0
 public function getPath(PHPClass $php)
 {
     foreach ($this->namespaces as $namespace => $dir) {
         if (strpos(trim($php->getNamespace()) . "\\", $namespace) === 0) {
             $d = strtr(substr($php->getNamespace(), strlen($namespace)), "\\", "/");
             $dir = rtrim($dir, "/") . "/" . $d;
             if (!is_dir($dir) && !mkdir($dir, 0777, true)) {
                 throw new PathGeneratorException("Can't create the '{$dir}' directory");
             }
             return rtrim($dir, "/") . "/" . $php->getName() . ".php";
         }
     }
     throw new PathGeneratorException("Can't find a defined location where save '{$php}' object");
 }
All Usage Examples Of Goetas\Xsd\XsdToPhp\Php\Structure\PHPClass::getNamespace