acquia / acquia-sdk-php

The Acquia SDK for PHP allows developers to build applications on top of Acquia services.
MIT License
25 stars 20 forks source link

Use CloudEnvironment::getenv method when looking for Acquia Hosting variables #59

Closed webbj74 closed 10 years ago

webbj74 commented 10 years ago

This PR builds off of the work @jacobbednarz provided in #58. Because Acquia Hosting inserts keys into $_ENV directly (when php_sapi() == CLI), getenv does not reliably get Acquia Hosting special vars. I added a wrapper to check getenv, $_ENV, and $_SERVER for a key and return its value.

jacobbednarz commented 10 years ago

:sparkles:

cpliakas commented 10 years ago

This looks great. My initial thought was to pick one method and stick with it, however as implemented I think that the approach is definitely sound and even more robust.

cpliakas commented 10 years ago

Thanks for the contributions, @jacobbednarz and @webbj74!