protected function parseConstKey($key, $curBlock)
    {
        $key = str_replace('\\\\', '\\', $key);

        if ($this->securityPolicy !== null && $this->securityPolicy->getConstantHandling() === SecurityPolicy::CONST_DISALLOW) {
            return 'null';
        }

        if ($curBlock !== 'root') {
            return '(defined("' . $key . '") ? ' . $key . ' : null)';
        }

        return $key;
    }
protected function parseConstKey($key, $curBlock)
    {
        $key = str_replace('\\\\', '\\', $key);

        if ($this->securityPolicy !== null && $this->securityPolicy->getConstantHandling() === SecurityPolicy::CONST_DISALLOW) {
            return 'null';
        }

        if ($curBlock !== 'root') {
            return '(defined("' . $key . '") ? ' . $key . ' : null)';
        }

        return $key;
    }
protected function parseConstKey ( $ key , $ curBlock ) { $ key = str_replace ( '\\\\' , '\\' , $ key ) ; if ( $ this -> securityPolicy !== null && $ this -> securityPolicy -> getConstantHandling ( ) === SecurityPolicy :: CONST_DISALLOW ) { return 'null' ; } if ( $ curBlock !== 'root' ) { return '(defined("' . $ key . '") ? ' . $ key . ' : null)' ; } return $ key ; }
Parses a constant.

@param string $key      the constant to parse
@param string $curBlock the current parser-block being processed

@return string parsed constant
Parses a constant .