Hi,

What are the main differences between the following code examples and which
is the best method and which would be quicker?
They both seem to achieve the end goal!



OPTION 1
--------
Index.php (Bootstrap)

<?php
Zend_Registry::set('config', new Zend_Config_Ini('magik.ini'));
?>

IndexController.php

<?php
$this->view->timeZone = Zend_Registry::get('config')->general->timeZone;
?>



OPTION 2
--------
Index.php (Bootstrap)

<?php
$config = new Zend_Config_Ini('magik.ini');
...
$controller = Zend_Controller_Front::getInstance();
$controller->setParam('config', $config);
?>

IndexController.php

<?php
$this->view->timeZone =
$this->getFrontController()->getParam('config')->general->timeZone);
?>

Cheers,

- Robert


________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________

Reply via email to