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


PHP content::setFContainer方法代码示例

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


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

示例1: __construct


//.........这里部分代码省略.........
                     if (file_exists($contoller_path) && (!empty($param["groups"]) || $err == 0)) {
                         if (empty($param["groups"])) {
                             $paccess = array();
                         } else {
                             $paccess = explode(",", $param["groups"]);
                         }
                         try {
                             if (!empty($param["mname"])) {
                                 $model_path = "build" . DIRECTORY_SEPARATOR . tbuild . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR . "model" . DIRECTORY_SEPARATOR . $param["mname"] . ".php";
                                 if (file_exists($model_path)) {
                                     require $model_path;
                                 }
                                 require $contoller_path;
                                 if ((in_array($_SESSION["mwcpoints"], $paccess) || in_array(4, $paccess) || $err == 0) && class_exists($param["mname"])) {
                                     $tmp = $param["mname"];
                                     $model = new $tmp();
                                     $pcontoller = new $name($model, $content, $plugin, $_SESSION["mwcserver"]);
                                     if (method_exists($name, "action_index")) {
                                         $pcontoller->init();
                                         $pcontoller->action_index();
                                         $pcontoller->parentOut();
                                     }
                                 }
                             } else {
                                 if (in_array($_SESSION["mwcpoints"], $paccess) || in_array(4, $paccess)) {
                                     $model = new $globalcfg["defModel"]();
                                     $pcontoller = new PController($model, $content, $plugin, $_SESSION["mwcserver"]);
                                     $pcontoller->genNonMVC($contoller_path);
                                     $pcontoller->parentOut($name);
                                 }
                             }
                         } catch (Exception $e) {
                             $content->error(1);
                             $content->setFContainer("plugin_{$name}", true);
                         }
                     }
                 }
             }
         }
         //endregion
         //region страницы
         //region получение контроллера и экшена
         $action_name = "action_index";
         if (!isset($_GET["p"])) {
             $controller = $globalcfg["defpage"];
         } else {
             $controller = htmlspecialchars($_GET["p"], ENT_QUOTES);
             if ($controller == "index") {
                 $controller = $globalcfg["defpage"];
             }
         }
         if (isset($_GET["a"])) {
             $action_name = "action_" . $_GET["a"];
         }
         //endregion
         require_once "build" . DIRECTORY_SEPARATOR . tbuild . DIRECTORY_SEPARATOR . "_dat" . DIRECTORY_SEPARATOR . $_SESSION["mwcserver"] . "_" . $_SESSION["mwclang"] . "_pages.php";
         if (isset($page[$controller])) {
             $path = "build" . DIRECTORY_SEPARATOR . tbuild . DIRECTORY_SEPARATOR . $page[$controller]["ppath"] . DIRECTORY_SEPARATOR . $controller . ".php";
             if (file_exists($path)) {
                 $access = explode(",", $page[$controller]["groups"]);
                 //region проверка на пользователя (если есть)
                 $ccfg = Configs::readCfg($controller, $_SESSION["mwcbuild"]);
                 if (!empty($ccfg["allowedUsrs"])) {
                     $usrs = explode(",", $ccfg["allowedUsrs"]);
                     if (!in_array($uid, $usrs)) {
                         $err = 2;
开发者ID:SanneA,项目名称:wodegongjubao,代码行数:67,代码来源:router.php


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