-- Belmin <[EMAIL PROTECTED]> wrote
(on Wednesday, 08 August 2007, 10:15 AM -0400):
> Is there any particular reason why query values should be accessed
> through the Request object?

I'm examining adding accessors such as setPost() and setQuery(); these
would make it easier to test applications, as you would then be able to
set these prior to dispatch, and your app wouldn't need to rely on $_GET
or $_POST.

> Looking at Controller/Request/Http.php the only benefit I could see is
> that you could pass a default value when accessing it through the
> Request object. Anything else?
> 
> --Belmin
> 
> On 8/8/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
> > -- Kexiao Liao <[EMAIL PROTECTED]> wrote
> > (on Wednesday, 08 August 2007, 06:43 AM -0700):
> > > I just begin to use Zend Framework. I need to get all the POST variables'
> > > values inside the html form. In normal php, we use $_POST variable. For 
> > > the
> > > Zend Framework, Do we have better approach to get all these POST data 
> > > once we
> > > click the submit button of the html form? Kevin
> >
> > ZF does not overwrite any of the superglobals ($_GET, $_POST, $_COOKIE,
> > etc), so you can always access them that way.
> >
> > From within an action controller, you can retrieve them via the request
> > object:
> >
> >     $received = $this->getRequest()->getPost();
> >
> > These can then be passed into the view:
> >
> >     $this->view->received = $received;
> >
> > --
> > Matthew Weier O'Phinney
> > PHP Developer            | [EMAIL PROTECTED]
> > Zend - The PHP Company   | http://www.zend.com/
> >
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to