On 30/05/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
-- Roman1975 <[EMAIL PROTECTED]> wrote
(on Tuesday, 29 May 2007, 01:32 PM -0700):
> Really complications Zend_Controller is purpose ZF?
> If to look at the first versions everyone was transparent and it is clear,
> but the further, the more difficultly
> To use given component Zend_Controller, what your opinion?

Ummm... what parts are less transparent now? What's harder?

In the old versions, if you wanted to create and render a view, you'd
have code like this:

    class FooController extends Zend_Controller_Action
    {
        public function barAction()
        {
            $view = new Zend_View();
            $view->setScriptPath(dirname(__FILE__) . '/../views/scripts');
            $view->setHelperPath(dirname(__FILE__) . '/../views/helpers');
            $view->content = 'Some content for my view';
            $view->render('foo/bar.phtml');
        }
    }

Now the following accomplishes the same:

    class FooController extends Zend_Controller_Action
    {
        public function barAction()
        {
            $this->view->content = 'Some content for my view';
        }
    }

Yes, I like current controller with viewRenderer
less typing ^^

Reply via email to