cakephp/cakephp — pull request #1317 by lorenzo (2013-05-30 14:13:27+00:00)
Title: Adding App.fullbaseURL as a recognized Configure value

I think I have cursed FULL_BASE_URL too many times already. It is inflexible and really hard to define on your own. It also make it a nightmare to have a multi-tenant application (like running on multiple subdomains), not to mention that you need to be able to predict the future when trying to generate emails in the CLI (You better define the contant really early in the bootstrap!)

This is my attempt to solve this problem. I introduced App.fullBaseURL as a Configure parameter and replaced all uses of FULL_BASE_URL to this one. For BC I left some shims that would still make it work with older applications. For performance reasons I'm caching the value inside a router variabele + created a method to evict the cached value if any obscure case requires you to change app domains at runtime.