<?php
/**
* Bootstrap
*
* LICENSE
*
* This source file is subject to the BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://svf.webutilities.ch/license/bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@webutilities.ch so we can send you a copy immediately.
*
* @package Application
* @category Bootstrap
* @uses Zend_Controller_Front
* @uses SVF_Controller_Plugin_Initialize
* @uses SVF_Controller_Plugin_Log_Firebug
* @uses SVF_Controller_Plugin_Log_File
* @uses SVF_Controller_Plugin_Log_Php
* @uses SVF_Controller_Plugin_Log_Hard
* @copyright Copyright (c) 2002-2008 Webutilities CH Inc. (http://www.webutilities.ch)
* @license BSD {@link http://svf.webutilities.ch/license/bsd}
* @author Silvan von Felten
* @version $Id$
*/
defined('APPLICATION_PATH') or define('APPLICATION_PATH', realpath(dirname(__FILE__)));
require_once 'version.php';
$paths = array
(
APPLICATION_PATH . '/models',
realpath(APPLICATION_PATH . '/../library'),
'.',
);
set_include_path(implode(PATH_SEPARATOR, $paths));
require_once 'Zend/Controller/Front.php';
$front = Zend_Controller_Front::getInstance();
require_once 'SVF/Controller/Plugin/initialize.php';
$front->registerPlugin(new SVF_Controller_Plugin_Initialize());
/**
* When you use this bootstrap file for your new application
* and you have understod how to use SVF_Log, add your own logger
* to the function iniLog() located in /library/SVF/Conntroller/Plugin/Initialize.php.
* When you do not know how to do this just load an plugin located in the directory
* /library/SVF/Controller/Plugin/Log/.
*/
// Remove this code from here, when you have set iniLog()
$logger = 'Hard';
if (isset($_GET['logger']))
$logger = $_GET['logger'];
switch($logger)
{
case 'Firebug':
require_once 'SVF/Controller/Plugin/Log/Firebug.php';
$front->registerPlugin(new SVF_Controller_Plugin_Log_Firebug());
break;
case 'File':
require_once 'SVF/Controller/Plugin/Log/File.php';
$front->registerPlugin(new SVF_Controller_Plugin_Log_File());
break;
case 'Php':
require_once 'SVF/Controller/Plugin/Log/Php.php';
$front->registerPlugin(new SVF_Controller_Plugin_Log_Php());
break;
default:
require_once 'SVF/Controller/Plugin/Log/Hard.php';
$front->registerPlugin(new SVF_Controller_Plugin_Log_Hard());
}
// until here
Zend_Controller_Front::getInstance()->dispatch();
|