Re: [fw-general] can _getParam() get $_POST['bar']['foo'] ?

2010-08-30 Thread Саша Стаменковић
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
wrote:

> -- Jordan Ryan Moore  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 
> 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| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
> PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
>


Re: [fw-general] can _getParam() get $_POST['bar']['foo'] ?

2010-08-30 Thread Matthew Weier O'Phinney
-- Jordan Ryan Moore  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  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| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc


Re: [fw-general] can _getParam() get $_POST['bar']['foo'] ?

2010-08-30 Thread Jordan Ryan Moore
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);

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  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


Re: [fw-general] can _getParam() get $_POST['bar']['foo'] ?

2010-08-30 Thread Hector Virgen
_getParam() only gets the top-level value, so you'll need to get the full
array first. But you can create an action helper that adds that
functionality if you need it on a regular basis.

--
Hector Virgen
Sent from my Droid X

On Aug 30, 2010 9:14 AM, "David Mintz"  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/


[fw-general] can _getParam() get $_POST['bar']['foo'] ?

2010-08-30 Thread David Mintz
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/