本文整理汇总了PHP中ActiveRecordModel::getLogger方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecordModel::getLogger方法的具体用法?PHP ActiveRecordModel::getLogger怎么用?PHP ActiveRecordModel::getLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecordModel
的用法示例。
在下文中一共展示了ActiveRecordModel::getLogger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Returns an instance of LiveCart Application
*
* Method prevents of creating multiple application instances during one request
*
* @return LiveCart
*/
public function __construct()
{
ClassLoader::import('application.model.ActiveRecordModel');
ClassLoader::import('framework.renderer.SmartyRenderer');
parent::__construct();
unset($this->session, $this->config, $this->locale, $this->localeName);
$dsnPath = ClassLoader::getRealPath("storage.configuration.database") . '.php';
$this->isInstalled = file_exists($dsnPath);
ActiveRecordModel::setApplicationInstance($this);
if ($this->isInstalled) {
ActiveRecordModel::setDSN(include $dsnPath);
if (!session_id()) {
$session = new DatabaseSessionHandler();
if ($this->getConfig()->get('USE_DEFAULT_SESSION_HANDLER') == false) {
$session->setHandlerInstance();
}
$this->sessionHandler = $session;
}
}
// LiveCart request routing rules
$this->initRouter();
if (file_exists(ClassLoader::getRealPath('cache.dev'))) {
$this->setDevMode(true);
}
if ($this->isDevMode()) {
ActiveRecordModel::getLogger()->setLogFileName(ClassLoader::getRealPath("cache") . DIRECTORY_SEPARATOR . "activerecord.log");
if (phpversion() >= '5.3') {
error_reporting(E_ALL & ~E_DEPRECATED);
} else {
error_reporting(E_ALL);
}
ini_set('display_errors', 'On');
}
$compileDir = $this->isTemplateCustomizationMode() ? 'cache.templates_c.customize' : 'cache.templates_c';
SmartyRenderer::setCompileDir(ClassLoader::getRealPath($compileDir));
// mod_rewrite disabled?
if ($this->request->get('noRewrite')) {
$this->router->setBaseDir($_SERVER['baseDir'], $_SERVER['virtualBaseDir']);
//$this->router->enableURLRewrite(false);
}
}