Skip to content

Instantly share code, notes, and snippets.

@tjFogarty
Created October 6, 2013 12:45
Show Gist options
  • Save tjFogarty/6853656 to your computer and use it in GitHub Desktop.
Save tjFogarty/6853656 to your computer and use it in GitHub Desktop.
Manage assets based on current environment
/**
* 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