Why does this symfony code not work?

Posted by morpheous on Stack Overflow See other posts from Stack Overflow or by morpheous
Published on 2010-06-17T10:08:32Z Indexed on 2010/06/17 10:13 UTC
Read the original article Hit count: 228

Filed under:
|

I am trying to pass parameters from one action (foo) to another (foobar).

In action foo, I set the arguments thus:

$request->getParameterHolder()->set('arg1', 'alice');
$request->getParameterHolder()->set('arg2', 'bob');

In action foobar, I try to retrieve the params thus:

$arg1 = $request->getParameter('arg1');
$arg2 = $request->getParameter('arg2');

$this->forward404Unless($arg1 && $arg2); //always forwarded

Note: I am aware that I can save the params into the user session variable - but I dont want to do that. I want to pass them as parameters - any ideas how to get this to work?

© Stack Overflow or respective owner

Related posts about php

Related posts about symfony