enrichissement/application/Bootstrap.php

51 lines
1.4 KiB
PHP
Raw Normal View History

2012-01-13 14:35:11 +01:00
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
//Initialisation global des paramètres de vue
protected function _initViewSettings()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->setEncoding('UTF-8');
$view->doctype('XHTML1_STRICT');
$view->headMeta()
->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
->appendHttpEquiv('Content-Language', 'fr-FR');
$view->headTitle()->setSeparator(' - ');
2012-01-15 18:43:37 +01:00
$view->headLink()
->appendStylesheet('/styles/reset.css', 'all')
->appendStylesheet('/styles/main.css', 'all')
->appendStylesheet('/jqueryui/jquery-ui.css', 'all');
$view->headScript()
->appendFile('/scripts/jquery.js', 'text/javascript')
2012-01-19 16:25:47 +01:00
->appendFile('/scripts/jquery-ui.js', 'text/javascript')
->appendFile('/scripts/enrichissement.js', 'text/javascript');
2012-01-15 18:43:37 +01:00
$view->headTitle()->setSeparator(' - ');
2012-01-13 14:35:11 +01:00
$view->headTitle('Enrichissement de fichier');
}
2012-01-15 18:43:37 +01:00
protected function _initDb()
{
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
try {
$db = Zend_Db::factory($dbConfig->db);
Zend_Db_Table::setDefaultAdapter ($db);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
Zend_Registry::set('db', $db);
}
2012-01-13 14:35:11 +01:00
//Initialisation global des paramètres de log
protected function _initLogging()
{
}
}