From 711aa5d7445d830543249aae16f338d7f4004a94 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 18 Aug 2015 23:14:27 -0700 Subject: [PATCH] \Civi - Add facade accessing system services --- Civi.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ composer.json | 1 + 2 files changed, 58 insertions(+) create mode 100644 Civi.php 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/"] } }, -- 2.25.1