Joomla 3.1 getUserStateFromRequest, will it return an array? -
short , sweet - can getuserstatefromrequest
return array? api documentation appears incomplete?
many thanks!
the joomla documentation if still quite limited looking @ source of japplication:: in joomla 2.5
public function getuserstatefromrequest($key, $request, $default = null, $type = 'none') { $cur_state = $this->getuserstate($key, $default); $new_state = jrequest::getvar($request, null, 'default', $type); // save new value if set in request. if ($new_state !== null) { $this->setuserstate($key, $new_state); } else { $new_state = $cur_state; } return $new_state; }
the answer yes can if set
jrequest::setvar('var1', array(1,2,3), 'default'); jfactory::getapplication->setuserstate('var1', array(123));
or pass request
$_get['var1'] = array(1,2,3); $_post['var1'] = array(1,2,3);
Comments
Post a Comment