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


PHP Application::app方法代码示例

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


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

示例1: getAppInfo

 public static function getAppInfo()
 {
     if (self::$app == NULL) {
         self::$app = new Application();
     }
     return self::$app;
 }
开发者ID:lukdog,项目名称:RaspiControl,代码行数:7,代码来源:Application.php

示例2: trigger_error

 public static function trigger_error($errmsg = '', $errtype = 0)
 {
     $app = Application::app();
     if ($app != null) {
         $app->setErrorNo($errtype);
         $app->setErrorMsg($errmsg);
     }
     trigger_error($errmsg, $errtype);
 }
开发者ID:liu33851861,项目名称:CZD_Yaf_Extension,代码行数:9,代码来源:Exception.php

示例3: init

 /**
  * Ініціалізація роутера
  */
 public static function init()
 {
     $requestUrl = explode('/', $_SERVER['REQUEST_URI']);
     self::$controller = ucfirst(isset($requestUrl[1]) ? $requestUrl[1] : '');
     self::$action = strtolower(isset($requestUrl[2]) ? $requestUrl[2] : '');
     self::$id = strtolower(isset($requestUrl[3]) ? $requestUrl[3] : '');
     if (!self::$controller) {
         self::$controller = Application::app()->getConfig('DefaultController');
     }
     if (!self::$action) {
         self::$action = 'index';
     }
     self::runController();
 }
开发者ID:serj1chen,项目名称:torrent_uawebchallenge,代码行数:17,代码来源:Router.php

示例4: set

 public static function set($_key, $_default = "")
 {
     if (empty($_key)) {
         return $_default;
     }
     $subkeys = explode('.', $_key);
     $_len = count($subkeys);
     if ($_len == 1) {
         Application::app()->{$subkeys}[0] = $_default;
     } else {
         if ($_len <= 2) {
             $_tobj = Application::app()->{$subkeys}[0];
             if (is_array($_tobj) && isset($_tobj[$subkeys[1]])) {
                 $_tobj[$subkeys[1]] = $_default;
                 Application::app()->{$subkeys}[0] = $_tobj;
             }
         }
     }
 }
开发者ID:h1soft,项目名称:h,代码行数:19,代码来源:Config.php

示例5: loginoutAction

 /**
  * 退出登录
  */
 public function loginoutAction()
 {
     $send['state'] = false;
     $params = $this->filterParams($this->_params);
     $model = new MobileModel();
     $patternArr = Application::app()->getConfig()->application->environment;
     $configArr = $patternArr->toArray();
     $pattern = $configArr['mode'];
     // 移动端已修改用户退出方案,这里不论私有云还是公有云,都只退出当前移动终端上的app
     if ($pattern == 'public') {
         $res = $model->loginOutPublicCloud($params);
     } else {
         $res = $model->loginOutPublicCloud($params);
     }
     if (!$res) {
         $send['error'] = 'Loginout failed';
     } else {
         $send['state'] = true;
         $send['data']['message'] = 'success';
     }
     $this->sendOutput($send);
 }
开发者ID:EdenYi,项目名称:demo,代码行数:25,代码来源:index.php

示例6: getApplication

 /**
  * returns the application
  *
  * @return Yaf_Application
  */
 public function getApplication()
 {
     return Application::app();
 }
开发者ID:zhangjingpu,项目名称:yaf-lib,代码行数:9,代码来源:Dispatcher.php

示例7: appInit

 /**
  * Static method to initialise the application
  * 
  * This method is called from {@link index.php} and inititalises the an application of
  * the class defined in {@link sys.config.php}. When developing an application with
  * RocketSled, you will usually override the Application class of an 'Application 
  * Level Package'. In order for that class to be used by RocketSled, you need to set
  * the required constant in {@link sys.config.php}, and then it will be returned by
  * {@link index.php}'s call to Application::appInit().
  *
  * The Application::appInit() function also calls several functions that setup the
  * application, which also give any overriding applications a good chance to do some
  * things they may required:
  * - {@link Application::systemSetup()}
  * - {@link Application::initUser()}
  * - {@link Application::siteNavigationInit()}
  *
  * @return Application - an initialised application class
  * @see Session,User,SiteNavigation,NavigationItem,sys.config.php
  * @access public
  * @static
  */
 public static function appInit()
 {
     Application::initSession();
     $app_class = constant('APPLICATION');
     self::$app = new $app_class();
     $ret = self::$app;
     $ret->systemSetup();
     $ret->initUser();
     $ret->siteNavigationInit();
     $ret->setRedirectionListener(Display::current(false));
     $ret->fetchRedirectedParameters();
     return $ret;
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:35,代码来源:application.class.php

示例8: __construct

 public function __construct()
 {
     $this->application = Application::app();
 }
开发者ID:h1soft,项目名称:h,代码行数:4,代码来源:Router.php

示例9: checkController

 public static function checkController($_name)
 {
     self::$_router->strNameSpace = sprintf("\\%s\\%s\\Controller\\%s", Application::app()->src, self::$_router->getAppName(), $_name);
     $controller = self::$_router->getControllerNameSpace();
     if (is_file(self::$appsPath . sprintf("%s/Controller/%s.php", self::$_router->getAppName(), $_name)) && class_exists(self::$_router->strNameSpace)) {
         self::$_router->setController(new $controller());
         return true;
     }
     return false;
 }
开发者ID:h1soft,项目名称:h,代码行数:10,代码来源:Application.php

示例10: isSuperAdmin

 /**
  * 最小的ID 是Admin
  */
 public function isSuperAdmin()
 {
     if (!$this->isLogin()) {
         redirect('index/login');
     }
     Session::getInstance()->set('redirect', Application::app()->request()->curUrl());
     $db = \hmvc\Db\Db::getConnection();
     $user = $db->getRow("SELECT MIN( id ) as id FROM  `h_admin`");
     if ($user['id'] == $this->session->get('auth.id')) {
         return true;
     }
     return false;
 }
开发者ID:h1soft,项目名称:h,代码行数:16,代码来源:Auth.php

示例11: urlRef

 public function urlRef()
 {
     $rtn = Application::session()->get('hurlref');
     return $rtn ? $rtn : Application::app()->request()->curUrl();
 }
开发者ID:h1soft,项目名称:h,代码行数:5,代码来源:RestController.php

示例12: app

 public static function app()
 {
     return Application::app();
 }
开发者ID:h1soft,项目名称:h,代码行数:4,代码来源:Plugin.php


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