Greetings everyone
Using the request object, I can’t get a sole value as in this URI:
http://mydomain.com/controller/action/value1
Using $request->getParams() is not returning the value1.
Output:
array([controller] => 'controller', [action] => 'action')
The key is missing.
The issue itself is quite simple and I could parse the URI myself, but actually I want ZF to do it (right?). I couldn’t find a hint using google or on SO.
How am I able to get a key without a value?
For default, Zend Framework expects the parameters in URL to be in the form of
/key/value. Try this:http://mydomain.com/controller/action/key1/value1
The result is:
Edit: as others mentioned, If you want to stick with
http://mydomain.com/controller/action/value1you should take a look atZend_Controller_Router.