本文整理汇总了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;
}
}