Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 17th, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Zend URL Parameter - Hide Key and Show Value
  2. protected function _initRoutes()
  3. {
  4.     $this->bootstrap('frontController');
  5.     $frontController = $this->getResource('frontController');
  6.     $router = $frontController->getRouter();
  7.  
  8.     $router->addRoute(
  9.         'name_for_the_route',
  10.         new Zend_Controller_Router_Route('controller/action/:key1/:key2/:key3', array('module' => 'default', 'controller' => 'theController', 'action' => 'theAction', 'key1' => NULL, 'key2' => NULL, 'key3' => NULL))
  11.     );
  12. }
  13.        
  14. $key1 = $this->_request->getParam('key1');
  15. $key2 = $this->_request->getParam('key2');
  16. $key3 = $this->_request->getParam('key3');
  17.        
  18. $numericArray = array_values($this->_request->getParams());