The point is; a big part of my site (the whole backend) does not use the MVC
because it is old and would take a lot of time to port. And I would really
like to reuse the functionality I built in one of the controllers (from my
MVC-frontend) - in the non-Zend-MVC-part of my site. Sure I can copy the
code from the controller having a new function creating the same pdf, but
.... I'd rather reuse the controller.
thanx
Ask
ask josephsen wrote:
>
> Hi
>
> I've got the MVC fired up and running, but from som special case I'd like
> to use some of the actions in a controller without the whole MVC. So I
> hope it is possible to instantiate the Controller and call an action, does
> anyone know how?
>
> I've got the following code so far:
>
> $front = Zend_Controller_Front::getInstance();
> $r = $front->getRouter();
> $r->addRoute('somename', new
> Zend_Controller_Router_Route('period/2008-01-01',array('controller' =>
> 'CreatePDF','action' => 'RenderAndOutputPDF')));
> $front->setRouter($r);
>
> But I can't get it to work probably :( Hope you can point me to a
> simple example.
>
> thanx
>
>
> ./ask
>
--
View this message in context:
http://www.nabble.com/use-Zend_Controller-without-MVC--tp19724450p19736521.html
Sent from the Zend Framework mailing list archive at Nabble.com.