X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi.php;h=fe16326de75dec4adc5e30a6069cdb2cd449e869;hb=388b7f79eca4715d58a7c2345be257b91c479c38;hp=20d78b670a25e772e5d4ebf10d9fcef720fb9347;hpb=3a84c0ab9022feeed11adf8f9023fd5f2d4459ba;p=civicrm-core.git diff --git a/Civi.php b/Civi.php index 20d78b670a..fe16326de7 100644 --- a/Civi.php +++ b/Civi.php @@ -54,6 +54,29 @@ class Civi { return Civi\Core\Container::singleton(); } + /** + * @return \Civi\Core\Lock\LockManager + */ + public static function lockManager() { + return \Civi\Core\Container::getBootService('lockManager'); + } + + /** + * @return \Psr\Log\LoggerInterface + */ + public static function log() { + return Civi\Core\Container::singleton()->get('psr_log'); + } + + /** + * Obtain the core file/path mapper. + * + * @return \Civi\Core\Paths + */ + public static function paths() { + return \Civi\Core\Container::getBootService('paths'); + } + /** * Fetch a service from the container. * @@ -70,8 +93,15 @@ class Civi { * singletons, containers. */ public static function reset() { - Civi\Core\Container::singleton(TRUE); self::$statics = array(); + Civi\Core\Container::singleton(); + } + + /** + * @return CRM_Core_Resources + */ + public static function resources() { + return CRM_Core_Resources::singleton(); } /** @@ -82,7 +112,7 @@ class Civi { * @return \Civi\Core\SettingsBag */ public static function settings($domainID = NULL) { - return Civi\Core\Container::singleton()->get('settings_manager')->getBagByDomain($domainID); + return \Civi\Core\Container::getBootService('settings_manager')->getBagByDomain($domainID); } }