示例#1
0
 /** Get the text content to make the edge include the given method call.
  * @see nxcESI::getIncludeForMethodCall()
  */
 public function getIncludeForMethodCall($methodInfo, $keys)
 {
     // Save the current EAS instance to restore it afterwards, so that the
     // called method can use nxcESIEAS without affecting the header for the
     // current response, which is for the full page.
     $easInstance = nxcESIEAS::restoreInstance(null);
     if ($methodInfo['static']) {
         $call = array($methodInfo['class'], $methodInfo['method']);
     } else {
         $class = $methodInfo['class'];
         $call = array(new $class(), $methodInfo['method']);
     }
     $content = call_user_func($call, $keys);
     if (!is_string($content)) {
         $content = '';
     }
     nxcESIEAS::restoreInstance($easInstance);
     return $content;
 }