summaryrefslogtreecommitdiffstats
path: root/application/Bootstrap.php
blob: 6a13af5270abcf0682fb767f4c076365ed1035b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/*
 * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
 * This program is free software distributed under the GPL version 2.
 * See http://gpl.openslx.org/
 *
 * If you have any feedback please consult http://feedback.openslx.org/ and
 * send your suggestions, praise, or complaints to feedback@openslx.org
 *
 * General information about OpenSLX can be found at http://openslx.org/
 */

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initAutoloader()
	{
		setlocale(LC_ALL, "de_DE.UTF-8");
		date_default_timezone_set('Europe/Berlin');
		$moduleLoader = new Zend_Application_Module_Autoloader
		(
		array
		(
                'namespace' => '',
                'basePath' => APPLICATION_PATH,
                'resourceTypes' => array(
					'form' => array(
						'path'      => 'forms',
						'namespace' => 'Form',
		)
		)
		)
		);
	}
	protected function _initAutoloaders()
	{
		$this->getApplication()->setAutoloaderNamespaces(array('Poolctrl_' => 'Poolctrl', 'Poolctrl_Validate_' => 'Poolctrl/Validator/'));
		return $this;
	}

	protected function _initAuth(){
		$auth = Zend_Auth::getInstance();
		$auth->setStorage(new Zend_Auth_Storage_Session('auth'));
	}
	protected function _initDocType(){
		$this->bootstrap('View');
		$view = $this->getResource('View');
		$view->doctype('XHTML1_STRICT');

	}
	function _initViewHelpers()
	{

		$this->bootstrap('layout');
			
		$layout = $this->getResource('layout');
		$view = $layout->getView();
		$view->doctype('XHTML1_STRICT');
		$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
		$view->headLink()->appendStylesheet('/media/css/jquery-ui-1.8.16.custom.css');
		$view->headLink()->appendStylesheet('/media/css/jquery-ui-timepicker.css');
		$view->headLink()->appendStylesheet('/media/css/fullcalendar.css');
		$view->headLink()->appendStylesheet('/media/css/style.css');
			
		$view->headTitle('poolctrl')
		->setSeparator(' :: ');
		Zend_Registry::set('dateformat' , 'Y-m-d H:i:s');
	}
	protected function _initPlugins()
	{
		$this->bootstrap('autoloaders');
		$this->bootstrap('frontController');
		$plugin = new Poolctrl_Controller_Plugin_Modularlayout();
		$this->frontController->registerPlugin($plugin);
	}

}
include '../library/Poolctrl/Functions.php';