Web/ActionController: provide $this->params

We always need params, this are our new URL params made accessible
this way. This is just for our query string, not for POST body params.
This commit is contained in:
Thomas Gelf 2014-06-17 12:58:04 +00:00
parent 468b290277
commit 992a8a276b
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,7 @@ use Icinga\Web\Notification;
use Icinga\File\Pdf; use Icinga\File\Pdf;
use Icinga\Exception\ProgrammingError; use Icinga\Exception\ProgrammingError;
use Icinga\Web\Session; use Icinga\Web\Session;
use Icinga\Web\UrlParams;
use Icinga\Session\SessionNamespace; use Icinga\Session\SessionNamespace;
use Icinga\Exception\NotReadableError; use Icinga\Exception\NotReadableError;
@ -83,6 +84,8 @@ class ActionController extends Zend_Controller_Action
protected $isRedirect = false; protected $isRedirect = false;
protected $params;
// TODO: This would look better if we had a ModuleActionController // TODO: This would look better if we had a ModuleActionController
public function Config($file = null) public function Config($file = null)
{ {
@ -118,6 +121,8 @@ class ActionController extends Zend_Controller_Action
Zend_Controller_Response_Abstract $response, Zend_Controller_Response_Abstract $response,
array $invokeArgs = array() array $invokeArgs = array()
) { ) {
$this->params = UrlParams::fromQueryString();
$this->setRequest($request) $this->setRequest($request)
->setResponse($response) ->setResponse($response)
->_setInvokeArgs($invokeArgs); ->_setInvokeArgs($invokeArgs);