Need to achieve dynamic router param segmenting in Zend Router. The idea is:
have the url: /route/:route/resource/:resource/:identifier, with the following configuration:
'orchestration.rest.dynamic-router' => array(
'type' => 'Segment',
'options' => array(
'route' => '/route/:route/resource/:resource[/:identifier]',
'defaults' => array(
'controller' => 'Controller',
),
),
),
Need to make it support n-number different key=>value router params in the following format:
/route/:route/resource/:resource/:identifier/key1/value1/key2/value2/key3/value3
The second problem is that this should work only if you have the optional :identifier parameter provided.
This is what I've checked, but not sure how to achieve the goal: https://docs.zendframework.com/zend-router/routing/#zend92router92http92segment
Leave static routes.
1) They are cached for better performance
2) if you use rest logic, use POST method, not GET(params in url)
the route
use post to consume rest action on server, with Ajax, or other...
other action like "getdatas"
... in your Controller.php
...handle show action in route
...handle getdatas action in route