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

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

public hasClassConstantWithFQSEN ( FullyQualifiedClassConstantName $fqsen ) : boolean
$fqsen Phan\Language\FQSEN\FullyQualifiedClassConstantName
Результат boolean True if an element with the given FQSEN exists
    public function hasClassConstantWithFQSEN(FullyQualifiedClassConstantName $fqsen) : bool
    {
        return $this->getClassMapByFQSEN($fqsen)->hasClassConstantWithName($fqsen->getNameWithAlternateId());
    }

Usage Example

Пример #1
0
 /**
  * @return bool
  * True if a constant with the given name is defined
  * on this class.
  */
 public function hasConstantWithName(CodeBase $code_base, string $name) : bool
 {
     return $code_base->hasClassConstantWithFQSEN(FullyQualifiedClassConstantName::make($this->getFQSEN(), $name));
 }