/** * Разбор блока * * @param array $token * @return string */ protected function _compileAutoClassOrMethodToken($token) { // Append token into result string $result = $token[1]; $tk = $this->_codeParser->nextToken(); // Finding the next parsable token while (!is_array($tk) || is_array($tk) && token_name((int) $tk[0]) != "T_STRING") { // T_WHITESPACE or & $tk = $this->_codeParser->nextToken(); } // T_STRING $nextToken = $this->_codeParser->currentToken(); // Include the class/function name into stack array_push($this->_defStack, array($token[1], $nextToken[1])); $tk = $this->_codeParser->currentToken(); // Returning to the last parsable token while (!is_array($tk) || is_array($tk) && (token_name((int) $tk[0]) != "T_CLASS" && token_name((int) $tk[0]) != "T_FUNCTION")) { // Anything else: T_CLASS / T_FUNCTION $tk = $this->_codeParser->previousToken(); } return $result; }