|
|||
|
<?php
ob_start(); /* ## BootStrapping File for the Framework ## */ //set the error reports as E_STRICT // error_reporting(E_ALL|E_STRICT); // Display all errors // ini_set('display_errors', true); //Set Default time zone // date_default_timezone_set('Europe/London'); //Set application root directory // $rootDir = dirname(dirname(__FILE__)); //only for local system // $rootDir = $rootDir.""; //$rootDir . '/Library'. PATH_SEPARATOR . get_include_path(); //add the libraries to the include path for php // set_include_path($rootDir . '/myapplication/Library'.PATH_SEPARATOR.$rootDir . '/myapplication/Application/models/'. PATH_SEPARATOR . get_include_path()); //Zend Loader Module for loading the classes // require_once 'Zend/Loader.php'; Zend_Loader :: loadClass('Zend_Debug'); Zend_Loader :: loadClass('Zend_Controller_Front'); Zend_Loader :: loadClass("Zend_Layout"); Zend_Loader :: loadClass('Zend_View'); Zend_Loader :: loadClass('Zend_Registry'); Zend_Loader :: loadClass("Zend_Config_Ini"); $registry = new Zend_Registry(); /* if a config file present in configs : config ini load the settings for database in test mode // */ //not required if other ways are used// $config = new Zend_Config_Ini("Application/configs/config.ini","test"); //load config : now test mode// $registry -> set("databaseName",$config->database->name); $registry -> set("databasePassword",$config->database->password); $registry -> set("databaseUser",$config->database->user); $registry -> set("databaseHost",$config->database->host); //Complex model with new Layouts : give common appearance to application // $layout = new Zend_Layout(); $layout -> startMvc(array("layoutPath"=>"Application/layouts","layout"=>"main")); $layout->setInflectorTarget('layouts/:script.:suffix'); $layout -> setViewSuffix('php'); //application layouts// $view = new Zend_View(); $view -> setScriptPath('Application/views/scripts'); $registry->set('view',$view); //Dispatch and rotuting to the controller // $frontController = Zend_Controller_Front::getInstance(); $frontController -> throwExceptions(true); $frontController -> setControllerDirectory('Application/controllers'); $frontController -> setParam('noViewRender',true); //Execute run method of the Dispatcher// $frontController->dispatch(); ?> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|