コード例 #1
0
 protected function tagRequire(&$token)
 {
     // Every require|include inside files in the include_path
     // is preprocessed thanks to Patchwork_Superloader::getProcessedPath().
     $token['no-autoload-marker'] = true;
     if (Patchwork_Superloader::$turbo && $this->dependencies['ConstantExpression']->nextExpressionIsConstant() && false !== ($a = Patchwork_Superloader::getProcessedPath($this->expressionValue, true))) {
         $token =& $this->getNextToken();
         $token[1] = ' ' . self::export($a) . str_repeat("\n", substr_count($token[1], "\n"));
     } else {
         $this->unshiftTokens($this->namespace ? array(T_NS_SEPARATOR, '\\') : array(T_WHITESPACE, ' '), array(T_STRING, 'Patchwork_Superloader'), array(T_DOUBLE_COLON, '::'), array(T_STRING, 'getProcessedPath'), '(');
         $this->exprLevel = -1;
         $this->register($this->exprCallbacks);
     }
 }