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


PHP Manager::getApp方法代码示例

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


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

示例1: getHref

 public static function getHref($href)
 {
     if ($href != '') {
         if ($href[0] == '#') {
             $href = Manager::getStaticURL(Manager::getApp(), substr($href, 1));
         } else {
             $href = MAction::getHrefAction($href);
         }
     }
     return $href;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:11,代码来源:maction.php

示例2: preProcess

 public function preProcess()
 {
     $frontController = $this->frontController;
     // exemplo de alteração da configuração dependendo do controller sendo executado
     $context = $frontController->getContext();
     $controller = $context->getController();
     if ($controller == 'controls') {
         Manager::setConf('session.check', false);
     }
     // é necessário validar a sessão?
     if (Manager::getConf('login.check') || Manager::getConf('session.check')) {
         $timeout = Manager::getSession()->checkTimeout(Manager::getConf('session.exception'));
     }
     if ($timeout) {
         $frontController->canCallHandler(false);
         $url = Manager::getURL(Manager::getApp() . '/main');
         $frontController->setResult(new MRedirect(NULL, $url));
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:19,代码来源:sessionFilter.php

示例3: getService

 public function getService($service, $module = '')
 {
     $controller = $this->getController();
     $service = Manager::getService(Manager::getApp(), $module == '' ? Manager::getModule() : $module, $service);
     $service->setData();
     return $service;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:7,代码来源:mcomponent.php

示例4: buildURL

 public function buildURL($action = '', $parameters = array())
 {
     //mtrace('buildURL = ' . $action);
     //mtrace($parameters);
     $app = Manager::getApp();
     $module = Manager::getModule();
     if ($action[0] == '@') {
         $url = Manager::getAppURL($app);
         $action = substr($action, 1);
     } elseif ($action[0] == '>') {
         $url = Manager::getAppURL($app);
         $action = substr($action, 1);
     } elseif ($action[0] == '#') {
         $url = Manager::getStaticURL();
         $action = substr($action, 1);
     } else {
         $url = Manager::getAppURL($app);
     }
     //mtrace('url = '. $url);
     $path = '';
     //mtrace("============== buildURL ============");
     //mtrace('*action = ' . $action);
     if ($p = strpos($action, '/')) {
         $index = substr($action, 0, $p);
         $action = substr($action, $p + 1);
     } else {
         $index = $module != '' ? $module : $app;
     }
     //    mtrace('index = ' . $index);
     //    mtrace('action = ' . $action);
     //$action = str_replace('.','/', $action);
     $path = '/' . $action;
     // mtrace('*index = ' . $index);
     //    mtrace('app = ' . $app);
     if ($index != $app) {
         $path = '/' . $index . $path;
     }
     //mtrace('*path = ' . $path);
     if (count($parameters)) {
         $query = http_build_query($parameters);
         $path .= (strpos($path, '?') === false ? '?' : '') . $query;
     }
     $url .= $path;
     //mtrace('url = ' . $url);
     //mtrace("============ end getURL ============");
     return $url;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:47,代码来源:mcontext.php

示例5: invokeHandler

 public function invokeHandler($m, $handler)
 {
     global $context, $module, $action, $item, $session, $page, $auth, $perms, $navbar, $theme, $history, $self, $url;
     if ($handler == '') {
         return false;
     }
     //$this->data = $data;
     $this->action = $handler;
     $app = Manager::getApp();
     if ($m == '' || $m == $app) {
         $module = $app;
         $path = Manager::getAppPath() . '/controllers/';
     } else {
         $module = $m;
         $path = Manager::getModulePath($module, 'controllers/');
     }
     //mdump("Handler:invokeHandler: [$module][$handler]");
     $context = Manager::getContext();
     $action = $context->getAction();
     $self = $context->getAction();
     $item = mrequest('item');
     $session = Manager::getSession();
     $navbar = new MNavigationBar();
     //$view = Manager::getView($module, 'handler', $action);
     $page = $this->theme;
     $url = Manager::getCurrentURL();
     $auth = Manager::getAuth();
     $perms = Manager::getPerms();
     $theme = $this->theme;
     $file = $path . $handler . '.inc.php';
     //mdump('Handler:invokeHandler: file : ' . $file);
     if ($return = file_exists($file)) {
         include $file;
     }
     return $return;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:36,代码来源:mhandler.php

示例6: handlerService

 public function handlerService()
 {
     if ($this->controllerAction == '') {
         $this->controllerAction = $this->context->getService() . '.' . $this->context->getAction();
     }
     mtrace('handler serviceAction=' . $this->controllerAction);
     $this->invokeService(Manager::getApp(), Manager::getModule(), $this->controllerAction);
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:8,代码来源:mfrontcontroller.php


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