Stuardo -StR- RodrÃguez schrieb:
Hi all, if I have:
$controller = Zend_Controller_Front::getInstance();
What is the diff between using
$controller->setControllerDirectory('controllers');
$controller->dispatch();
and using
$controller->run('BizMS/Controller');
they do the same, right?
No, because you set different controller directories. :-)
However, have a look at the code, it's open source ...
run() does all three things: getInstance(), setControllerDirectory() and
dispatch(). And, run() is a static method. You don't need an instance to
call run(). Just use this one line:
Zend_Controller_Front::run('path/to/controllers');
Gunar