PHPCfg\Parser::parseExpr_ConstFetch PHP Method

parseExpr_ConstFetch() protected method

protected parseExpr_ConstFetch ( PhpParser\Node\Expr\ConstFetch $expr )
$expr PhpParser\Node\Expr\ConstFetch
    protected function parseExpr_ConstFetch(Expr\ConstFetch $expr)
    {
        if ($expr->name->isUnqualified()) {
            $lcname = strtolower($expr->name);
            switch ($lcname) {
                case 'null':
                    return new Literal(null);
                case 'true':
                    return new Literal(true);
                case 'false':
                    return new Literal(false);
            }
        }
        $nsName = null;
        if ($this->currentNamespace && $expr->name->isUnqualified()) {
            $nsName = $this->parseExprNode(Node\Name::concat($this->currentNamespace, $expr->name));
        }
        return new Op\Expr\ConstFetch($this->parseExprNode($expr->name), $nsName, $this->mapAttributes($expr));
    }
Parser