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


PHP Sigma::setRoot方法代碼示例

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


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

示例1: __construct


//.........這裏部分代碼省略.........
         $this->loadSettings();
         /**
          * Checks if the system has been installed (CONTREXX_INSTALLED).
          * If not, the user will be redirected to the web-installer.
          */
         if ($checkInstallationStatus) {
             $this->checkInstallationStatus();
         }
         /**
          * Verifies that the basic configuration ($_CONFIG) has bee loaded.
          * If not, the system will halt.
          */
         $this->checkBasicConfiguration();
         /**
          * Sets the path to the customizing directory (/customizing) of the website,
          * if the associated functionality has been activatd.
          */
         $this->setCustomizingPath();
         /**
          * Sets the mode Cloudrexx runs in
          * One of self::MODE_[FRONTEND|BACKEND|CLI|MINIMAL]
          */
         $this->setMode($mode);
         /**
          * Early initializations. Verifies that the system is online (not suspended).
          * Initializes the ClassLoader, the legacy Environment variables and executes
          * the preInit-hook-scripts. Finally it verifies the requested HTTP-Host.
          */
         $this->preInit();
         /**
          * Defines the core constants (ASCMS_*) of Cloudrexx as defined in config/set_constants.php
          * and config/SetCustomizableConstants.php.
          */
         $this->defineLegacyConstants();
         /**
          * Loads ClassLoader, EventManager and Database connection
          * For now, this also loads some legacy things like API, AdoDB, Env and InitCMS
          */
         $this->init();
         /**
          * In order to make this file customizable, we explicitly
          * search for a subclass of Cx\Core\Core\Controller\Cx named Cx\Customizing\Core\Cx
          * If such a class is found, it is loaded and this request will be stopped
          */
         $this->handleCustomizing();
         /**
          * Initialize license
          */
         $this->preComponentLoad();
         /**
          * Loads all active components
          */
         $this->loadComponents();
         $this->postComponentLoad();
         /**
          * Initialize request
          * Request is not initialized for command mode
          */
         $this->postInit();
         /**
          * Since we have a valid state now, we can start executing
          * all of the component's hook methods.
          * This initializes the main template, executes all hooks
          * and parses the template.
          *
          * This is not executed automaticly in minimal. Invoke it
          * yourself if necessary and be sure to handle exceptions.
          *
          * Command mode is different ;-)
          */
         if ($this->mode == self::MODE_MINIMAL) {
             return;
         }
         $this->loadContrexx();
     } catch (InstanceException $e) {
         return;
     } catch (\Cx\Core\Error\Model\Entity\ShinyException $e) {
         if ($this->mode != self::MODE_BACKEND) {
             throw new \Exception($e->getMessage());
         }
         // reset root of Cx\Core\Html\Sigma to backend template path
         $this->template->setRoot($this->codeBaseAdminTemplatePath);
         $this->template->setVariable('ADMIN_CONTENT', $e->getBackendViewMessage());
         $this->setPostContentLoadPlaceholders();
         $this->finalize();
         die;
     } catch (\Exception $e) {
         \header($_SERVER['SERVER_PROTOCOL'] . ' 500 Server Error');
         if (file_exists($this->websiteDocumentRootPath . '/offline.html')) {
             $offlinePath = $this->websiteDocumentRootPath;
         } else {
             $offlinePath = $this->codeBaseDocumentRootPath;
         }
         echo file_get_contents($offlinePath . '/offline.html');
         \DBG::msg('Cloudrexx initialization failed! ' . get_class($e) . ': "' . $e->getMessage() . '"');
         \DBG::msg('In file ' . $e->getFile() . ' on Line ' . $e->getLine());
         \DBG::dump($e->getTrace());
         die;
     }
 }
開發者ID:Cloudrexx,項目名稱:cloudrexx,代碼行數:101,代碼來源:Cx.class.php


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