Beispiel #1
0
	function __construct() {
		$this->lib(array('Config', 'databases/Query'));
		
		//$this->libs->Config->get('Session', 'sessionTableName')
		
		//$this->libs->Config->get('Session', 'sessionDataTableName')
		D::log('Session is starting');
		$this->start();
		
		SweetEvent::bind('SweetFrameworkEnd', array($this, 'save'));
	}
	/**
	 * end function. Shuts the party down.
	 * 
	 * @access public
	 * @static
	 * @return void
	 */
	static function end($exit=false) {
		SweetEvent::trigger('SweetFrameworkEnd');
		
		SweetEvent::$events = array();
		
		D::time('App', 'End');
		D::close();
		
		self::$paths = array(
			'lib' => array('/sweet-framework/libs/'),
			'model' => array(),
			'helper' => array('/sweet-framework/helpers/'),
			'controller' => array(),
			'config' => array('/sweet-framework/settings/')
		);
		self::$classes = array();
		if($exit) {
			exit;
		}
	}