ApiGen\Parser\Reflection\ReflectionClass::getOwnConstants PHP Method

getOwnConstants() public method

public getOwnConstants ( )
    public function getOwnConstants()
    {
        if ($this->ownConstants === null) {
            $this->ownConstants = [];
            $className = $this->reflection->getName();
            foreach ($this->getConstants() as $constantName => $constant) {
                if ($className === $constant->getDeclaringClassName()) {
                    $this->ownConstants[$constantName] = $constant;
                }
            }
        }
        return $this->ownConstants;
    }