Phan\Language\Type::asFQSENString PHP Метод

asFQSENString() публичный Метод

public asFQSENString ( ) : string
Результат string A string representation of this type in FQSEN form.
    public function asFQSENString() : string
    {
        return $this->memoize(__METHOD__, function () {
            if (!$this->hasNamespace()) {
                return $this->getName();
            }
            if ('\\' === $this->getNamespace()) {
                return '\\' . $this->getName();
            }
            return "{$this->getNamespace()}\\{$this->getName()}";
        });
    }

Usage Example

Пример #1
0
 /**
  * @return FullyQualifiedClassName
  * A fully qualified class name from the given type
  */
 public static function fromType(Type $type) : FullyQualifiedClassName
 {
     return self::fromFullyQualifiedString($type->asFQSENString());
 }