You are here

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

1 call to Environment::Get()
Base::env in api/src/manipulators/Base.php

File

api/src/environments/Environment.php, line 41
Define autoload class.

Class

Environment
The abstract base environment.

Namespace

Drupal\realistic_dummy_content_api\environments

Code

static function Get() {
  if (!self::$env) {
    self::$env = new LiveEnvironment();
  }
  return self::$env;
}