TheSeer\Autoload\Parser::processInterface PHP Method

processInterface() private method

private processInterface ( $pos )
    private function processInterface($pos)
    {
        $list = array('{');
        $stack = $this->getTokensTill($pos, $list);
        $stackSize = count($stack);
        $name = $this->inNamespace != '' ? $this->inNamespace . '\\' : '';
        $extends = '';
        $extendsList = array();
        $mode = 'name';
        foreach (array_slice($stack, 1, -1) as $tok) {
            switch ($tok[0]) {
                case T_NS_SEPARATOR:
                case T_STRING:
                    ${$mode} .= $tok[1];
                    continue;
                case T_EXTENDS:
                    $mode = 'extends';
                    continue;
                case ',':
                    if ($mode == 'extends') {
                        $extendsList[] = $this->resolveDependencyName($extends);
                        $extends = '';
                    }
            }
        }
        $name = $this->registerUnit($name, T_INTERFACE);
        if ($extends != '') {
            $extendsList[] = $this->resolveDependencyName($extends);
        }
        $this->dependencies[$name] = $extendsList;
        $this->inUnit = $name;
        return $pos + $stackSize - 1;
    }