I'm using zendframework. Here i used getRequest()
method outside the controller, inside the CliCommands class.But it through an error.
PHP Fatal error: Uncaught Error: Call to undefined method
V1Command::getRequest().
Is there any way to use the getRequest() outside the controller?
UPDATE:
After using this:
$front = Zend_Controller_Front::getInstance();
$all = $front->getRequest()->getParams();
Now I'm getting this type of error:
Fatal error: Uncaught Error: Call to a member function getParams() on null