当前位置: 首页>>代码示例>>PHP>>正文


PHP functions::outputFunctionCall方法代码示例

本文整理汇总了PHP中functions::outputFunctionCall方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::outputFunctionCall方法的具体用法?PHP functions::outputFunctionCall怎么用?PHP functions::outputFunctionCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在functions的用法示例。


在下文中一共展示了functions::outputFunctionCall方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: OutputStartpage

 public static function OutputStartpage($containerclass = "")
 {
     $stdout = "";
     if (!empty($containerclass)) {
         $stdout .= "        <div id='" . $containerclass . "'>\r\n\r\n";
     }
     foreach ($GLOBALS["documentClass"]->getConfig("startpage") as $clarr) {
         if (!is_array($clarr) && $clarr == "clear") {
             $stdout .= "        <div class='column-end'></div>\r\n";
         } else {
             foreach ($clarr as $class => $arr) {
                 $stdout .= "        <!-- = = = = = = = = = = = = = = = = = = = = = = -->\r\n\r\n";
                 if (!empty($class)) {
                     $stdout .= "        <div class='" . $class . "'>\r\n\r\n";
                 }
                 if (is_array($arr)) {
                     foreach ($arr as $cmd) {
                         $stdout .= functions::outputFunctionCall($cmd);
                     }
                 }
                 if (!empty($class)) {
                     $stdout .= "\r\n        </div>\r\n";
                 }
             }
         }
         // end if
     }
     // end foreach
     $stdout .= "        <!-- = = = = = = = = = = = = = = = = = = = = = = -->\r\n\r\n";
     if (!empty($containerclass)) {
         $stdout .= "        </div> <!-- " . $containerclass . " -->\r\n";
     }
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:34,代码来源:

示例2: OutputPage

 public function OutputPage()
 {
     // ---------------------------------------------------------------------------
     // READ CONFIGURATION OF THIS PAGE
     // ---------------------------------------------------------------------------
     $this->initiatePage();
     if ($this->isHeaderSent()) {
         return "";
     }
     $this->setHeaderSent();
     // ---------------------------------------------------------------------------
     // HANDLE EXCEPTIONAL DOCUMENTS
     // ---------------------------------------------------------------------------
     // -- For redirects
     if ($this->getConfig("url")) {
         header("X-Robots-Tag: noindex, nofollow");
         header("Cache-control: public, no-cache, must-revalidate");
         header("Expires: " . gmdate(RFC_TIME_FORMAT, time()));
         header("Location: " . $this->getConfig("url"));
         die;
     }
     // -- For plaintext output
     if ($this->getConfig("contenttype") == "plain") {
         header("Content-Type: text/plain; charset=" . CHARSET);
         $stdout = "";
         if (!is_null($this->getPageConfig("command"))) {
             foreach (explode(";", $this->getPageConfig("command")) as $cmd) {
                 $stdout .= functions::outputFunctionCall($cmd);
             }
         }
         return $stdout;
     }
     // -- Assumed to provide its own http headers
     if ($this->getConfig("contenttype") == "standalone") {
         $stdout = "";
         if (!is_null($this->getPageConfig("command"))) {
             foreach (explode(";", $this->getPageConfig("command")) as $cmd) {
                 $stdout .= functions::outputFunctionCall($cmd);
             }
         }
         return $stdout;
     }
     // -- RSS feed page
     if ($this->getConfig("contenttype") == "feed") {
         header("Content-Type: application/rss+xml; charset=" . CHARSET);
         $stdout = "";
         if (!is_null($this->getPageConfig("command"))) {
             foreach (explode(";", $this->getPageConfig("command")) as $cmd) {
                 $stdout .= functions::outputFunctionCall($cmd);
             }
         }
         return $stdout;
     }
     // ---------------------------------------------------------------------------
     // HANDLE REGUALR DOCUMENTS
     // ---------------------------------------------------------------------------
     // -- Check if browser sent request header "Accept-Encoding: gzip, deflate",
     //    and in that case send "Content-Encoding: gzip" response header:
     if (USE_COMPRESS && extension_loaded('zlib')) {
         ob_start("ob_gzhandler");
     }
     // -- Send other HTTP headers not supplied by the server:
     $this->outputHttpHeaders();
     // -- Create HTML code for entire page and return to calling script
     return $this->buildPageHtml();
 }
开发者ID:,项目名称:,代码行数:66,代码来源:

示例3: get

 public static function get($cachename, $cachetype = "s", $callback = "")
 {
     $GLOBALS["nw_debug"]["fromcache_get"] = 0;
     // -- Must specify $callback
     if (empty($callback)) {
         $GLOBALS["nw_debug"]["fromcache_get"] = 1;
         return "";
     }
     // -- Must specify $cachename
     $cachename = strtolower(preg_replace("/\\W/", "", $cachename));
     // keep only "a-z0-9_"
     if (empty($cachename)) {
         $GLOBALS["nw_debug"]["fromcache_get"] = 2;
         return "";
     }
     //if (IS_SECURE and in_array($cachename,array("startpage"))) $cachename = REQUESTSCHEME . "_" . $cachename;
     // -- Collect any extra passed parameters that will be passed on to the $callback function.
     $args = func_get_args();
     unset($args[0]);
     unset($args[1]);
     unset($args[2]);
     $callbackFunction = $callback . "('" . implode("','", $args) . "')";
     // -- If page called with GET variable 'cache' (any value), per-page and per-session
     //    caches are emptied to guarantee clean regeneration.
     if (isset($_REQUEST["cache"])) {
         self::reset_page_cache();
         self::reset_session_cache();
     }
     // -- Fetch requested cache, or regenerate it if it doesn't exist:
     switch ($cachetype) {
         // ----------------------------------------------------------------------------
         // Cache stored in $GLOBALS (per-page cache)
         // ----------------------------------------------------------------------------
         case "g":
             if (isset($GLOBALS["cache"][$cachename])) {
                 return $GLOBALS["cache"][$cachename];
             } else {
                 $pagecontent = functions::outputFunctionCall($callbackFunction);
                 $GLOBALS["cache"][$cachename] = $pagecontent;
                 return $pagecontent;
             }
             break;
             // ----------------------------------------------------------------------------
             // Cache stored in $_SESSION (per-visit cache)
             // ----------------------------------------------------------------------------
         // ----------------------------------------------------------------------------
         // Cache stored in $_SESSION (per-visit cache)
         // ----------------------------------------------------------------------------
         case "s":
             if (isset($_SESSION["cache"][$cachename])) {
                 return $_SESSION["cache"][$cachename];
             } else {
                 $pagecontent = functions::outputFunctionCall($callbackFunction);
                 $_SESSION["cache"][$cachename] = $pagecontent;
                 return $pagecontent;
             }
             break;
             // ----------------------------------------------------------------------------
             // Cache stored in a file in '/tmp' regenerated every 12 or 24 hrs (per-site cache)
             // ----------------------------------------------------------------------------
         // ----------------------------------------------------------------------------
         // Cache stored in a file in '/tmp' regenerated every 12 or 24 hrs (per-site cache)
         // ----------------------------------------------------------------------------
         case "12":
         case "24":
             /*
             //TODO: call instead function that creates cache file name
                     $datestring = "Y-m-d" . ( ($cachetype=="12") ? "-A" : "" );
                     $cachefile =
                       CACHE_PATH .
                       //( in_array($cachename,array("startpage")) ? REQUESTSCHEME."_" : "" ) .
                       CACHE_DOCROOT_PREFIX . "_" .
                       strtoupper($cachename) . "_" .
                       date($datestring,time()).".html";
             */
             $cachefile = self::get_cache_filename($cachename, $cachetype);
             // Return contents of existing cache file:
             if (file_exists($cachefile)) {
                 $GLOBALS["nw_debug"]["fromcache_get"] = 4;
                 $pagecontent = unserialize(file_get_contents($cachefile));
                 if (!empty($pagecontent)) {
                     return $pagecontent;
                 }
             }
             // Recreate and return non-existing cache file:
             if (!file_exists($cachefile) || empty($pagecontent)) {
                 $GLOBALS["nw_debug"]["fromcache_get"] = 5;
                 $pagecontent = functions::outputFunctionCall($callbackFunction);
                 $fp = fopen($cachefile, "w");
                 fwrite($fp, serialize($pagecontent));
                 fclose($fp);
                 return $pagecontent;
             }
             break;
             // ----------------------------------------------------------------------------
         // ----------------------------------------------------------------------------
         default:
             $GLOBALS["nw_debug"]["fromcache_get"] = 6;
             return "";
     }
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例4: BstartpageAnnouncements

 static function BstartpageAnnouncements($id = "announcements", $class = "", $openOnclick = false)
 {
     /* RESTORE if needed
         // If want accordion effect
         $class = str_replace("acc-item","",str_replace("onetab","",$class));
         $class .= ($openOnclick) ? " acc-item onetab openonclick" : "";
         $class = trim($class);
     */
     $items = "";
     /*
         $items =
           functions::callMethod('news','lib/news','drawLinkCurrentnewsissue','announce-news','','box infosection') .
           functions::callMethod('position','lib/position','outputProposePrograms','announce-programs','','box infosection') .
           functions::callMethod('position','lib/position','OutputOpenPositions','announce-positions','','box infosection','1','0','1') .
           functions::callMethod('event','lib/event','outputRegistrationOpen','announce-registration','','box infosection','1');
     */
     foreach ($GLOBALS["documentClass"]->getConfig("startpageannouncements") as $cmd) {
         $items .= functions::outputFunctionCall($cmd);
     }
     if ($openOnclick) {
         $items = "            <h2><span>Announcements</span></h2>\r\n" . "            <div>\r\n" . $items . "\r\n" . "            </div>\r\n";
     }
     $stdout = "          <div id='block-" . $id . "'" . (!empty($class) ? " class='" . $class . "'" : "") . ">\r\n" . "\r\n" . $items . "          </div> <!-- " . $id . " -->\r\n" . "\r\n";
     return $stdout;
 }
开发者ID:,项目名称:,代码行数:25,代码来源:


注:本文中的functions::outputFunctionCall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。