| 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/junkdata/nammall/application/ |
Upload File : |
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected $_docRoot;
protected function _initPath()
{
$this->_docRoot = realpath(APPLICATION_PATH . '/../');
Zend_Registry::set('docRoot', $this->_docRoot);
}
/**
* Initialize the application autoload
*
* @return Zend_Application_Module_Autoloader
*/
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'DCB',
'basePath' => $this->_docRoot . '/application',
));
return $autoloader;
}
protected function _initControllers() {
$this->bootstrap('frontController');
$this->_front = $this->getResource('frontController');
$this->_front->addControllerDirectory(APPLICATION_PATH . '/modules/admin/controllers', 'admin');
}
public function _initRoutes() {
$router = Zend_Controller_Front::getInstance()->getRouter();
$router->addRoutes(
array(
new Zend_Controller_Router_Route('cms/:id', array('module' => 'default', 'controller' => 'cms', 'action' => 'showpage')),
));
$routerArray = [];
$routerArray[0] = new Zend_Controller_Router_Route('shop/:cat', array('module' => 'index', 'controller' => 'list', 'action' => 'index'));
$routerArray[1] = new Zend_Controller_Router_Route('shop/:cat/:subcat', array('module' => 'index', 'controller' => 'list', 'action' => 'index'));
$routerArray[2] = new Zend_Controller_Router_Route('product/:prod', array('module' => 'index', 'controller' => 'detail', 'action' => 'index'));
$router = Zend_Controller_Front::getInstance()->getRouter();
$router->addRoutes( $routerArray );
$controller = Zend_Controller_Front::getInstance();
$controller->setRouter($router);
}
protected function _initLog()
{
$writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/logs/error.log');
return new Zend_Log($writer);
}
}