| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bsite.hellogtx.com/ |
Upload File : |
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
// protected function _initCheckWWW(){
// if(!preg_match('/www/', $_SERVER['HTTP_HOST']))
// {
// header("Location: http://www.superdmc.com/");
// exit;
// }
// }
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Travel',
'basePath' => dirname(__FILE__),
));
Zend_Controller_Action_HelperBroker::addPrefix('Helper');
Zend_Session::start();
date_default_timezone_set("Asia/Kolkata");
/* Get Options from Applicaton.ini */
$config = $this->getOptions();
}
protected function _initControllers()
{
$this->bootstrap('frontController');
$this->_front = $this->getResource('frontController');
$this->_front->addControllerDirectory(APPLICATION_PATH . '/admin/controllers', 'admin');
$this->_front->throwExceptions(true);
}
protected function _initView()
{
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headTitle("");
$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper(
'ViewRenderer'
);
$view->headMeta()->setIndent(8);
$view->headLink()->setIndent(8);
$view->headScript()->setIndent(8);
$view->setHelperPath(APPLICATION_PATH . "/views/helpers/");
$viewRenderer->setView($view);
$this->_view = $view;
return $this->_view;
}
protected function _initCache()
{
Zend_Controller_Front::getInstance()->setParam('disableOutputBuffering', true);
$frontendOptionsCore = array(
'automatic_serialization' => true,
'lifetime' => 3600
);
$frontendOptionsPage = array(
'automatic_serialization' => true,
'lifetime' => 3600,
'default_options' => array(
'cache_with_get_variables' => true,
'cache_with_session_variables' => true,
'cache_with_cookie_variables' => true,
'make_id_with_get_variables' => true,
'make_id_with_session_variables' => true,
'make_id_with_cookie_variables' => false
)
);
$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../cache');
//echo '<pre>';print_r($backendOptions);die('wwwwss');
$this->_cache = Zend_Cache::factory('Core', 'File', $frontendOptionsCore, $backendOptions);
$pageCache = Zend_Cache::factory('Page', 'File', $frontendOptionsPage, $backendOptions);
// Set global cache objects
Zend_Registry::set('pageCache', $pageCache);
Zend_Registry::set('cacheCoreFile', $this->_cache);
}
protected function _initConstants()
{
$registry = Zend_Registry::getInstance();
$config = $this->getOptions();
if (isset($config['constants'])) {
$registry->constants = new Zend_Config($this->getApplication()->getOption('constants'));
}
}
protected function _initRoutes()
{
$routerArray = [];
$routerArray[0] = new Zend_Controller_Router_Route('cms/:cms', array('module' => 'cms', 'controller' => 'index', 'action' => 'index'));
$routerArray[1] = new Zend_Controller_Router_Route('packageview/:countryname/:name/', array('module' => 'holidays', 'controller' => 'detail', 'action' => 'index'));
$routerArray[2] = new Zend_Controller_Router_Route('byo/id/:id', array('module' => 'byo', 'controller' => 'index', 'action' => 'index'));
$routerArray[3] = new Zend_Controller_Router_Route('dynamic/:countryname/:name/', array('module' => 'holidays', 'controller' => 'detail', 'action' => 'dynamic'));
$routerArray[4] = new Zend_Controller_Router_Route('activities/detail/:name/', array('module' => 'activities', 'controller' => 'detail', 'action' => 'index'));
$routerArray[5] = new Zend_Controller_Router_Route('dynamic1/:countryname/:name/', array('module' => 'holidays', 'controller' => 'detail', 'action' => 'dynamic1'));
$routerArray[6] = new Zend_Controller_Router_Route('byonew', array('module' => 'byo', 'controller' => 'index', 'action' => 'index'));
$routerArray[7] = new Zend_Controller_Router_Route('byonew/id/:id', array('module' => 'byo', 'controller' => 'index', 'action' => 'index'));
$routerArray[8] = new Zend_Controller_Router_Route('login/:id', array('module' => 'default', 'controller' => 'index', 'action' => 'index'));
$router = Zend_Controller_Front::getInstance()->getRouter();
$router->addRoutes($routerArray);
$controller = Zend_Controller_Front::getInstance();
$controller->setRouter($router);
// include APPLICATION_PATH . "/configs/routes.php";
}
// protected function _initSessions() {
// $this->bootstrap('session');
// }
//ini_set('session.gc_maxlifetime', 864000);
}