本文整理汇总了PHP中Am_Di::hasService方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Di::hasService方法的具体用法?PHP Am_Di::hasService怎么用?PHP Am_Di::hasService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Di
的用法示例。
在下文中一共展示了Am_Di::hasService方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function __construct(Am_Di $di = null)
{
parent::__construct();
if (null === $di) {
$this->di = Am_Di::getInstance();
} else {
$this->di = $di;
}
if ($this->di->hasService('theme')) {
$this->theme = $this->di->theme;
} else {
$this->theme = new Am_Theme($this->di, 'default', array());
}
$this->setHelperPath('Am/View/Helper', 'Am_View_Helper_');
$this->setEncoding('UTF-8');
foreach ($this->di->viewPath as $dir) {
$this->addScriptPath($dir);
}
if (!$this->getScriptPaths()) {
$this->addScriptPath(dirname(__FILE__) . '/../../application/default/views');
}
$this->headScript()->prependScript("window.rootUrl = " . Am_Controller::getJson(REL_ROOT_URL) . ";\n");
$this->headScript()->prependScript("window.CKEDITOR_BASEPATH = " . Am_Controller::getJson(REL_ROOT_URL . '/application/default/views/public/js/ckeditor/') . ";\n");
$this->headScript()->prependScript("window.amLangCount = " . Am_Controller::getJson(count(Am_Di::getInstance()->config->get('lang.enabled'))) . ";\n");
}