model view controller - call action with parametr from route -


i have following action in zf2 controller

    public function indexaction($text1,$text2) { } 

is there way call indexaction $text1 & $text2 params route

for example :

localhost/project/index/text1/sadasd/text2/asdasd

take @ zend\mvc\controller\plugin\params.

example code be:

$t1 = $this->params()->fromroute('text1'); $t2 = $this->params()->fromroute('text1');  // edit, fromroute() default, can $t1 = $this->params('text1', $defaultvalue); 

adding them parameters indexaction() won't anything.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -