src/ReflectionFileNamespace.php
public function getConstants($withDefined = false)
    {
        if ($withDefined) {
            if (!isset($this->fileConstantsWithDefined)) {
                $this->fileConstantsWithDefined = $this->findConstants(true);
            }

            return $this->fileConstantsWithDefined;
        }

        if (!isset($this->fileConstants)) {
            $this->fileConstants = $this->findConstants();
        }

        return $this->fileConstants;
    }
public function getConstants($withDefined = false)
    {
        if ($withDefined) {
            if (!isset($this->fileConstantsWithDefined)) {
                $this->fileConstantsWithDefined = $this->findConstants(true);
            }

            return $this->fileConstantsWithDefined;
        }

        if (!isset($this->fileConstants)) {
            $this->fileConstants = $this->findConstants();
        }

        return $this->fileConstants;
    }
public function getConstants ( $ withDefined = false ) { if ( $ withDefined ) { if ( ! isset ( $ this -> fileConstantsWithDefined ) ) { $ this -> fileConstantsWithDefined = $ this -> findConstants ( true ) ; } return $ this -> fileConstantsWithDefined ; } if ( ! isset ( $ this -> fileConstants ) ) { $ this -> fileConstants = $ this -> findConstants ( ) ; } return $ this -> fileConstants ; }
Returns a list of defined constants in the namespace

@param bool $withDefined Include constants defined via "define(...)" in results.

@return array
Returns a list of defined constants in the namespace