static function Environment::Get in Realistic Dummy Content 8
Get the current environment.
see the comment on the private variable $env.
default to a live environment if none is set. (During testing, a mock environment will be set here so we can better control it.)
Return value
An object of type Environment
File
- api/
src/ environments/ Environment.php, line 41 - Define autoload class.
Class
- Environment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\environmentsCode
static function Get() {
if (!self::$env) {
self::$env = new LiveEnvironment();
}
return self::$env;
}