Fernando, Thanks for your reply.
I think creating a separate service to "build" the message ($view->x = y and then $message = $view->render) overkill. And by injecting the view object I can achieve DI and ease my tests IMHO. I found the solution (or at least one solution) : I had to manually use the $view->setScriptPath prior to trying to call render. This seems to be called automatically when used inside a controller/action. If there is a better way I'd really appreciate. - Mario On Thu, Nov 24, 2011 at 9:54 PM, Fernando Andre <[email protected]> wrote: > Hello, > > I think by logic you shouldn't be passing a view to the service layer, you > should have split those... Has in: > > View calls -> Service passing it the data to be sent and not passing the > view to the service > > Console script calls -> Service passing the same info > > Anyway I would recomend you checking if it's using the same config file for > the directory path's. > > Why are you using render? > Are you trying to send the render output via email using MIME? > > Best regards, > FR > > -- > View this message in context: > http://zend-framework-community.634137.n4.nabble.com/Using-Zend-View-from-command-line-tp4105277p4106145.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- > List: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > >
