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

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

private processTrait ( )
    private function processTrait()
    {
        $current = $this->id;
        $traitId = $this->addAtom('Trait');
        $this->currentClassTrait[] = $traitId;
        $this->toggleContext(self::CONTEXT_TRAIT);
        $nameId = $this->processNextAsIdentifier();
        $this->addLink($traitId, $nameId, 'NAME');
        // Process block
        ++$this->id;
        $blockId = $this->processBlock(false);
        $this->popExpression();
        $this->addLink($traitId, $blockId, 'BLOCK');
        $fullnspath = $this->getFullnspath($nameId);
        $this->setAtom($traitId, array('code' => $this->tokens[$current][1], 'fullcode' => $this->tokens[$current][1] . ' ' . $this->atoms[$nameId]['fullcode'] . static::FULLCODE_BLOCK, 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0]), 'fullnspath' => $fullnspath));
        $this->addDefinition('class', $fullnspath, $traitId);
        $this->pushExpression($traitId);
        $this->processSemicolon();
        $this->toggleContext(self::CONTEXT_TRAIT);
        array_pop($this->currentClassTrait);
        return $traitId;
    }
Load