Created
October 6, 2013 12:45
-
-
Save tjFogarty/6853656 to your computer and use it in GitHub Desktop.
Manage assets based on current environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Environment | |
* Lets us manage assets based on current environment | |
*/ | |
class Environment { | |
/** | |
* @param $localEnvironment (default value is 'localhost' if nothing is passed) | |
* @return boolean | |
*/ | |
public static function isLocal( $localEnvironment = 'localhost' ) { | |
if( strpos($_SERVER['SERVER_NAME'], $localEnvironment) !== false ) { | |
return true; | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment