views:

642

answers:

2

I am using Xajax in Zend Framework. I need to call action of particular controller in function of Xajax Class I have created.

+1  A: 

Can you not place the action code you need to call into the model and then call it from there within the action and wherever else like:

$model = new Model;
$model->methodToCall();
sbohan
No. It will not work this way. Actually I am using xajax. I have created a Global class in which I have written code for Xajax implementation. And from this class I want to call action of the controller. So is there a way in Zend for calling action of particular controller outside MVC scope ?
A: 

I do not want to go to the DB transaction..

I have a class named G_Xajax{}, in that class i have written a method

function getResults($controller, $action=''){ $this->_xajaxResponse->assign("divshow", "innerHTML",'Here Value from View')); return $this->_xajaxResponse }

Note : "Here Value from view" is basically a view page ie. demo.phtml..

but using zend's conventional method that is controller->action.

This class is outsided of zend's MVC pattern.

so how do i call the view page as we call from any normal controller.

Remember the above class is not the controller just a normal class.

Thanks