Zephir\ClassDefinition::hasConstant PHP Method

hasConstant() public method

Checks if class definition has a property
public hasConstant ( string $name ) : boolean
$name string
return boolean
    public function hasConstant($name)
    {
        if (isset($this->constants[$name])) {
            return true;
        }
        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition) {
            if ($extendsClassDefinition->hasConstant($name)) {
                return true;
            }
        }
        /**
         * Check if constant is defined in interfaces
         */
        return $this->hasConstantFromInterfaces($name);
    }