If there is a PHP function that can get  $_POST['bar']['foo']  using
fnc($this->_getParam(),
'foo') then this is not required. Otherwise, using temporary var and
$tmp['foo'] it makes 2 lines of code :)

Regards,
Saša Stamenković


On Mon, Aug 30, 2010 at 8:35 PM, Matthew Weier O'Phinney
<[email protected]>wrote:

> -- Jordan Ryan Moore <[email protected]> wrote
> (on Monday, 30 August 2010, 09:22 AM -0700):
> > Currently, _getParam() can't access $_POST['person']['email']
> > directly. I miss this ability myself. I might be nice to add support
> > by passing an array of keys:
> >
> > $this->_getParam(array('person', 'email'), $default);
>
> Would that get the person and email keys? or would it look for an email
> subkey of person?
>
> (Just hinting that this syntax is ambiguous, which is one reason we
> haven't implemented it before.)
>
> > I believe this would need to be added to the controller and request
> > classes. File a ticket in JIRA, and I'll take a look.
> >
> > On Mon, Aug 30, 2010 at 9:14 AM, David Mintz <[email protected]>
> wrote:
> > > Just wondering if there's a way for a controller to use
> $this->_getParam()
> > > directly to get a POST datum which itself is within an array. Like with
> a
> > > subform for example. So if you have $_POST['person']['email'] can you
> get at
> > > the email in one _getParam() call? Or do you have to
> > >      $person = $this->_getParam('person') ;
> > > and then work with $person['email'] ?
> > >
> > >
> > >
> > >
> > > --
> > > Support real health care reform:
> > > http://phimg.org/
> > >
> > > --
> > > David Mintz
> > > http://davidmintz.org/
> > >
> > >
> > >
> >
> >
> >
> > --
> > Jordan Ryan Moore
> >
>
> --
> Matthew Weier O'Phinney
> Project Lead            | [email protected]
> Zend Framework          | http://framework.zend.com/
> PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
>

Reply via email to