Phan\CodeBase::getClassConstantByFQSEN PHP Метод

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

public getClassConstantByFQSEN ( FullyQualifiedClassConstantName $fqsen ) : Phan\Language\Element\ClassConstant
$fqsen Phan\Language\FQSEN\FullyQualifiedClassConstantName The FQSEN of a class constant to get
Результат Phan\Language\Element\ClassConstant A class constant with the given FQSEN
    public function getClassConstantByFQSEN(FullyQualifiedClassConstantName $fqsen) : ClassConstant
    {
        return $this->getClassMapByFQSEN($fqsen)->getClassConstantByName($fqsen->getNameWithAlternateId());
    }

Usage Example

Пример #1
0
 /**
  * @return ClassConstant
  * The class constant with the given name.
  */
 public function getConstantWithName(CodeBase $code_base, string $name) : ClassConstant
 {
     return $code_base->getClassConstantByFQSEN(FullyQualifiedClassConstantName::make($this->getFQSEN(), $name));
 }