$params = Request::forge('some / route') ->set_method ('POST')->execute(array('myparam' => 'value'));
public function action_index()
{
// fetch the output of a controller
$widget = Request::forge('user')->set_method('GET')->execute(array('myparam' => 'value'));
echo $widget;
}
public function action_index()
{
var_dump(Request::active()->params());
var_dump(Input::get());
var_dump(func_get_args());
}
$this->param('fieldname');
Harro Verton wrote on Monday 5th of November 2012:You should be able to fetch those parameters using$this->param('fieldname');
$widget = Request::forge('community/user')->set_method('GET')->execute(array('myparam' => 'value'));
var_dump($this->param('myparam'));
Harro Verton wrote on Monday 5th of November 2012:No, the Input class hydrates and (optionally) sanitizes the input on first use, later calls will not access the global anymore.
$_GET['tomato'] = 2;
// fetch the output of a controller
$widget = Request::forge('community/user')->execute();
var_dump(Input::get());
Harro Verton wrote on Tuesday 6th of November 2012:But probably only because it's the first call to get() ?
It looks like you're new here. If you want to get involved, click one of these buttons!