public static function RealisticDummyContentEnvironment::get in Realistic Dummy Content 7.2
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::get()
- 3.x api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::get()
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
object An object of type RealisticDummyContentEnvironment
1 call to RealisticDummyContentEnvironment::get()
- RealisticDummyContentBase::env in api/
src/ includes/ RealisticDummyContentBase.php - Retrieves the current environment class.
File
- api/
src/ includes/ RealisticDummyContentEnvironment.php, line 37
Class
- RealisticDummyContentEnvironment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public static function get() {
if (!self::$env) {
self::$env = new RealisticDummyContentLiveEnvironment();
}
return self::$env;
}