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

getNamespaceName() public method

public getNamespaceName ( ) : string
return string
    public function getNamespaceName()
    {
        return $this->namespaceName;
    }

Usage Example

 public function getPath(ClassGenerator $php)
 {
     foreach ($this->namespaces as $namespace => $dir) {
         if (strpos(trim($php->getNamespaceName()) . "\\", $namespace) === 0) {
             $d = strtr(substr($php->getNamespaceName(), 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->getNamespaceName()}\\{$php->getName()}' object");
 }
All Usage Examples Of Zend\Code\Generator\ClassGenerator::getNamespaceName