views:

50

answers:

1

in zend framework, is there anyway i can check if a route exists from code?

example

say the following routes/urls are valid (point to controller/action)

/users
/users/1 // /users?id=1
/users/page/1  /users?page=1
/users/tagged/tagname/page/1 /users?tagged=1&page=1

if the user tries to goto /users/nonexistantpage it should fail. soemthing to check if the user request the url, will it fail, but on the code level.

A: 

I believe you're looking for the match() method for the Zend router. See if that helps.

Inkspeak