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


PHP TPL::switchTTL方法代码示例

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


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

示例1: tieALLRegisteredAdminInterfaces

 /**
  * Will tie in ALL registered administrator interfaces in the framework;
  *
  * This method will do a scan of all modules defined in the framework, and WILL do a CALL to each bonding method of those
  * respective methods; For the Authentication and Administration module, proper code is implemented, because of the strict
  * bonding between these two modules;
  * @return void Will not return a thing, but probably error if something goes wrong;
  */
 private function tieALLRegisteredAdminInterfaces()
 {
     // Set some predefined defaults, just to be sure we have something;
     TPL::manageTTL(self::$objHeaderText);
     TPL::switchTTL();
     // Add the current page, or subpage to the <title> ...
     TPL::manageTTL(isset($_GET[ADMIN_PAGE]) ? $_GET[ADMIN_PAGE] : new S());
     TPL::manageTTL(isset($_GET[ADMIN_SUBPAGE]) ? $_GET[ADMIN_SUBPAGE] : new S());
     // Do a for-each on ALL registered modules within' the framework;
     $objRegisteredModules = $this->getRegisteredModules();
     foreach ($objRegisteredModules as $k => $v) {
         // IGNORE: Administration, because it's manually tied;
         if ($this->getPathToModule()->toRelativePath() == $v['dir']->toString()) {
             $this->tieInWithAdministration($this);
             continue;
         }
         // IGNORE: Authentication, because it's manually tied;
         if ($this->getObjectCLASS(self::$objAuthenticationMech) == $v['obj']) {
             if (self::$objAuthenticationMech->checkCurrentUserZoneACL($this->getObjectCLASS(self::$objAuthenticationMech))->toBoolean() == TRUE) {
                 self::$objAuthenticationMech->tieInWithAdministration($this);
             }
             continue;
         } else {
             // Make the object, and store it;
             $objMod = $this->activateModule(new FilePath($v['dir']), new B(TRUE));
             $objMod->tieInWithAuthentication(self::$objAuthenticationMech);
             if (self::$objAuthenticationMech->checkCurrentUserZoneACL($this->getObjectCLASS($objMod))->toBoolean() == TRUE) {
                 // Do the tie;
                 $objMod->tieInWithAdministration($this);
             }
         }
     }
     // Set some predefines;
     if (self::$objMenuArray == NULL) {
         self::$objMenuArray = new A();
     }
     if (self::$objSubMArray == NULL) {
         self::$objSubMArray = new A();
     }
     // Set the script end;
     self::setExeTime(new S('administration_end'));
     // After we know all the details, execute the viewer whit these parameters;
     $tpF = new FilePath($this->getPathToSkin()->toRelativePath() . 'administration.tp');
     TPL::tpSet(new F(self::getExeTime(new S('administration_start'), new S('administration_end'))), new S('objExeTime'), $tpF);
     TPL::tpSet(self::$objSwitcherLink, new S('objSwitcherLink'), $tpF);
     TPL::tpSet(self::$objHeaderText, new S('objHeaderText'), $tpF);
     TPL::tpSet(self::$objFooterText, new S('objFooterText'), $tpF);
     TPL::tpSet(self::$objMenuArray, new S('objMenuArray'), $tpF);
     TPL::tpSet(self::$objSubMArray, new S('objSubMArray'), $tpF);
     TPL::tpSet(self::$objLogOutLink, new S('objLogOutLink'), $tpF);
     TPL::tpExe($tpF);
 }
开发者ID:ajbm6,项目名称:raphpframework,代码行数:60,代码来源:00_Administration.php


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