BetterReflection\Reflection\ReflectionClass::getNamespaceName PHP 메소드

getNamespaceName() 공개 메소드

Get the "namespace" name of the class (e.g. for A\B\Foo, this will return "A\B").
public getNamespaceName ( ) : string
리턴 string
    public function getNamespaceName()
    {
        if (!$this->inNamespace()) {
            return '';
        }
        return implode('\\', $this->declaringNamespace->name->parts);
    }

Usage Example

예제 #1
0
 /**
  * {@inheritDoc}
  */
 public function getNamespaceName()
 {
     return $this->betterReflectionClass->getNamespaceName();
 }