You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the "assemble" method of the route is missing. This is absolutely needed to generate URLs, but this is not as easy to do, because only the root route is defined in config, and others are just "guessed", so that kind of things $this->url('/users/tweets', array('user_id' => 3, 'tweet_id' => 5) cannot work because only the /users route is defined.
Some syntax like $this->url('/users', array('user_id' => 4)) are tempting, and can be used to generate URL for /users/4, /users/4/tweets/5 (with $this->url('/users', array('user_id' => 4, 'tweet_id' => 5)), but URL for a collection like /users/4/tweets cannot be generated.
Another solution would be to programmatically add new route as we discover them, but I don't really like this solution.
The way that ZF 2 router is made make this more complicated than it seems, and I really want a simple syntax (as the URL helper is mainly used in view helpers... the syntax must not be super-complex).
The text was updated successfully, but these errors were encountered:
Currently the "assemble" method of the route is missing. This is absolutely needed to generate URLs, but this is not as easy to do, because only the root route is defined in config, and others are just "guessed", so that kind of things $this->url('/users/tweets', array('user_id' => 3, 'tweet_id' => 5) cannot work because only the /users route is defined.
Some syntax like
$this->url('/users', array('user_id' => 4))
are tempting, and can be used to generate URL for /users/4, /users/4/tweets/5 (with$this->url('/users', array('user_id' => 4, 'tweet_id' => 5)
), but URL for a collection like /users/4/tweets cannot be generated.Another solution would be to programmatically add new route as we discover them, but I don't really like this solution.
The way that ZF 2 router is made make this more complicated than it seems, and I really want a simple syntax (as the URL helper is mainly used in view helpers... the syntax must not be super-complex).
The text was updated successfully, but these errors were encountered: