當前位置: 首頁>>代碼示例>>PHP>>正文


PHP App::getURLForDesignDirectory方法代碼示例

本文整理匯總了PHP中Gekosale\App::getURLForDesignDirectory方法的典型用法代碼示例。如果您正苦於以下問題:PHP App::getURLForDesignDirectory方法的具體用法?PHP App::getURLForDesignDirectory怎麽用?PHP App::getURLForDesignDirectory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gekosale\App的用法示例。


在下文中一共展示了App::getURLForDesignDirectory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Run

 public static function Run()
 {
     if (isset(self::$config['profiler']) && self::$config['profiler'] == $_SERVER['REMOTE_ADDR']) {
         Profiler::start();
     }
     App::init();
     self::$registry->router->setVariables();
     self::$registry->xajax = new Xajax();
     if (self::$registry->router->getMode() == 0) {
         $url = preg_replace_callback('~[^a-zA-Z0-9:/\\?,_-]+~', function ($s) {
             return urlencode($s[0]);
         }, self::$registry->router->getUri());
         self::$registry->xajax->configure('requestURI', $url);
     } else {
         // force language in admin mode
         Session::unsetActiveLanguage();
         self::$registry->core->setLanguage('pl');
         Translation::loadTranslations();
     }
     self::$registry->xajaxInterface = new XajaxInterface();
     self::$registry->right = new Right(self::$registry);
     Session::clearTemp();
     DEFINE('URL', App::getHost(1) . '/' . LOCAL_CATALOG);
     App::checkSSL();
     if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
         DEFINE('DESIGNPATH', str_replace('http://', 'https://', App::getURLForDesignDirectory()));
     } else {
         DEFINE('DESIGNPATH', App::getURLForDesignDirectory());
     }
     // remember login and password
     if (self::$registry->router->getModeFromRoute() == 'admin') {
         if ((int) Session::getActiveUserid() === 0) {
             App::getModel('login')->getAdminAutologinKey();
         }
     } else {
         if ((int) Session::getActiveClientid() === 0) {
             App::getModel('clientlogin')->getAutologinKey();
         }
     }
     self::$registry->template = new Template(self::$registry, self::$registry->router->getMode());
     self::$registry->template->setStaticTemplateVariables();
     $content = self::$registry->router->controllerLoader();
     if (isset(self::$config['profiler']) && self::$config['profiler'] == $_SERVER['REMOTE_ADDR']) {
         Profiler::stop();
         $content .= Profiler::getInfo();
     }
     $response = new Response($content);
     $response->send();
     App::getModel('csrfprotection')->reindex();
 }
開發者ID:krisldz,項目名稱:Gekosale2,代碼行數:50,代碼來源:App.php


注:本文中的Gekosale\App::getURLForDesignDirectory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。