From: Tim Otten Date: Wed, 19 Aug 2015 06:14:27 +0000 (-0700) Subject: \Civi - Add facade accessing system services X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=711aa5d7445d830543249aae16f338d7f4004a94;p=civicrm-core.git \Civi - Add facade accessing system services --- diff --git a/Civi.php b/Civi.php new file mode 100644 index 0000000000..0d899a65f4 --- /dev/null +++ b/Civi.php @@ -0,0 +1,57 @@ +get($id); + } + + /** + * Reset all ephemeral system state, e.g. statics, + * singletons, containers. + */ + public static function reset() { + Civi\Core\Container::singleton(TRUE); + self::$statics = array(); + } + +} diff --git a/composer.json b/composer.json index 2866db1b7d..39232d7fad 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,7 @@ "autoload": { "psr-0": { "PHPUnit_": ["packages/"], + "Civi": "", "Civi\\": [".", "tests/phpunit/"] } },