Exakat\Tasks\Load::processCase PHP Метод

processCase() приватный Метод

private processCase ( )
    private function processCase()
    {
        $caseId = $this->addAtom('Case');
        $current = $this->id;
        while (!in_array($this->tokens[$this->id + 1][0], array(T_COLON, T_SEMICOLON))) {
            $this->processNext();
        }
        $itemId = $this->popExpression();
        $this->addLink($caseId, $itemId, 'CASE');
        ++$this->id;
        // Skip :
        $this->startSequence();
        while (!in_array($this->tokens[$this->id + 1][0], array(T_CLOSE_CURLY, T_CASE, T_DEFAULT, T_ENDSWITCH))) {
            $this->processNext();
        }
        $this->addLink($caseId, $this->sequence, 'CODE');
        $this->endSequence();
        $this->setAtom($caseId, array('code' => $this->tokens[$current][1] . ' ' . $this->atoms[$itemId]['fullcode'] . ' : ' . self::FULLCODE_SEQUENCE . ' ', 'fullcode' => $this->tokens[$current][1] . ' ' . $this->atoms[$itemId]['fullcode'] . ' : ' . self::FULLCODE_SEQUENCE . ' ', 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0])));
        $this->pushExpression($caseId);
        return $caseId;
    }
Load