zendframework/zf2 — pull request #1386 by SocalNick (2012-05-27 22:06:00+00:00)
Title: A new route to match optional subdomains.

For example, route :subdomain.zend.com would match both framework.zend.com and www.zend.com.

Another important feature is URL assembly for various environments. We configure the route to be :env.www.zend.com. In our code, we assemble the URL for www.zend.com. But through local configuration, we could set an environment variable. Depending on the environment variable, the assembled URL would be dev.www.zend.com, stg.www.zend.com, or simply www.zend.com for production.

Please note: I chose to make a separate class for this use case, however, if you'd rather me integrate this feature into the Hostname route, I'm willing to do so.