Exakat\Tasks\Load::processNsname PHP Method

processNsname() private method

private processNsname ( )
    private function processNsname()
    {
        $current = $this->id;
        if ($this->tokens[$this->id][0] === T_NS_SEPARATOR && $this->tokens[$this->id + 1][0] === T_STRING && in_array(strtolower($this->tokens[$this->id + 1][1]), array('true', 'false')) && $this->tokens[$this->id + 2][0] !== T_NS_SEPARATOR) {
            $nsnameId = $this->addAtom('Boolean');
        } elseif ($this->tokens[$this->id][0] === T_NS_SEPARATOR && $this->tokens[$this->id + 1][0] === T_STRING && strtolower($this->tokens[$this->id + 1][1]) === 'null' && $this->tokens[$this->id + 2][0] !== T_NS_SEPARATOR) {
            $nsnameId = $this->addAtom('Null');
        } else {
            $nsnameId = $this->addAtom('Nsname');
        }
        $fullcode = array();
        $rank = 0;
        if ($this->hasExpression()) {
            $left = $this->popExpression();
            $this->addLink($nsnameId, $left, 'SUBNAME');
            $fullcode[] = $this->atoms[$left]['code'];
            $this->setAtom($left, array('rank' => $rank));
            $absolute = false;
        } else {
            $fullcode[] = '';
            $absolute = true;
        }
        while ($this->tokens[$this->id][0] === T_NS_SEPARATOR) {
            $subnameId = $this->processNextAsIdentifier();
            $this->setAtom($subnameId, array('rank' => ++$rank));
            $this->addLink($nsnameId, $subnameId, 'SUBNAME');
            $fullcode[] = $this->atoms[$subnameId]['code'];
            // Go to next
            ++$this->id;
            // skip \
        }
        // Back up a bit
        --$this->id;
        $x = array('code' => $this->tokens[$current][1], 'fullcode' => implode('\\', $fullcode), 'line' => $this->tokens[$current][2], 'variadic' => false, 'token' => $this->getToken($this->tokens[$current][0]), 'absolute' => $absolute);
        $this->setAtom($nsnameId, $x);
        if ($this->isContext(self::CONTEXT_NEW)) {
            $fullnspath = $this->getFullnspath($nsnameId, 'class');
            $this->setAtom($nsnameId, array('fullnspath' => $fullnspath));
            $this->addCall('class', $this->getFullnspath($nsnameId), $nsnameId);
        } else {
            $fullnspath = $this->getFullnspath($nsnameId, 'const');
            $this->setAtom($nsnameId, array('fullnspath' => $fullnspath));
            $this->addCall('const', $this->getFullnspath($nsnameId), $nsnameId);
        }
        $this->pushExpression($nsnameId);
        return $this->processFCOA($nsnameId);
    }
Load