当前位置: 首页>>代码示例>>PHP>>正文


PHP D::initialize方法代码示例

本文整理汇总了PHP中D::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP D::initialize方法的具体用法?PHP D::initialize怎么用?PHP D::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在D的用法示例。


在下文中一共展示了D::initialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

	function __construct() {
		//crap we need for the framework
		//$GLOBALS['app'] = $this; //stop this.
		$this->helper('functional'); //makes my life oh so much easier :)
		$this->lib(array('D', 'Config')); //Get the debuger and the config loader
		
		D::initialize($this->libs->Config->get('Debug')); //start the debugger up with some config options
		D::time('App', 'SweetFramework - ' . date('F j, Y, g:i a')); //Write what time the framework starts to the log
		//register_shutdown_function('SweetFramework::end');
	}
开发者ID:noblejay,项目名称:Sweet-Framework,代码行数:10,代码来源:SweetFramework.php

示例2: __construct

	function __construct($configFile) {
		//crap we need for the framework
		$GLOBALS['app'] = $this; //stop this.
		$this->helper('functional'); //makes my life oh so much easier :)
		$this->lib(array('D', 'Config'));
		D::initialize($this->libs->Config->get('Debug'));
		D::time('App', 'SweetFramework - ' . date("F j, Y, g:i a"));
		
		$appInfo = $this->libs->Config->get('SweetFramework', 'app');
		
		
		//define('APPLOC', LOC . $appInfo['folder']);
		
		foreach($appInfo['paths'] as $k => $v) {
			if(!is_array(self::$paths[$k])) {
				self::$paths[$k] = array();
			}
			//@todo A/B test these two.
			self::$paths[$k][] = '/' . $appInfo['folder'] . '/' . $v .'/';
			//self::$paths[$k][] = join('/', array(LOC, $appInfo['folder'], $v)) .'/';
		}

		/*
		$db = $this->config->get('Site', 'database');
		Databases::newDatabase($db);
		Databases::setCurrentDb($db);
		*/
		
		//Handy stuff that is always used
//		$this->includeLibrary('Session.php');
//		$this->includeLibrary('SweetModel.php');
		$this->lib(array('Uri', 'Theme'));
		

		$this->libs->Uri->callRoute();
		
		//Check for theme and go!
		/*
		if(!$this->lib->Theme->setTheme($this->config->get('Site', 'defaultTheme'))) {
			D::error('Theme could not be found. Debug: $Config->getSetting(\'Site\', \'defaultTheme\') = ' . $this->config->get('Site', 'defaultTheme'));
		}
		*/
		
		
		//$this->loadController('Main.php'); //this is where it starts to get interesting…
		self::end();
		//after we are done.
		//Session::writeData();
		
	}
开发者ID:ajcates,项目名称:Sweet-Framework-old,代码行数:50,代码来源:SweetFramework.php


注:本文中的D::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。