projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-14478 - ManagedEntities - Add support for 'cleanup' policy ("unused")
[civicrm-core.git]
/
Civi
/
Core
/
Container.php
diff --git
a/Civi/Core/Container.php
b/Civi/Core/Container.php
index e251f2adf9e8f1739d18e4dfbebec8423a96966a..f70369ad150eb5a373ef5c162ea39e32e720bd70 100644
(file)
--- a/
Civi/Core/Container.php
+++ b/
Civi/Core/Container.php
@@
-13,6
+13,10
@@
use Symfony\Component\DependencyInjection\Reference;
// TODO use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
// TODO use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+/**
+ * Class Container
+ * @package Civi\Core
+ */
class Container {
const SELF = 'civi_container_factory';
class Container {
const SELF = 'civi_container_factory';
@@
-23,10
+27,11
@@
class Container {
private static $singleton;
/**
private static $singleton;
/**
+ * @param bool $reset whether to forcibly rebuild the entire container
* @return \Symfony\Component\DependencyInjection\TaggedContainerInterface
*/
* @return \Symfony\Component\DependencyInjection\TaggedContainerInterface
*/
- public static function singleton() {
- if (self::$singleton === NULL) {
+ public static function singleton(
$reset = FALSE
) {
+ if (
$reset ||
self::$singleton === NULL) {
$c = new self();
self::$singleton = $c->createContainer();
}
$c = new self();
self::$singleton = $c->createContainer();
}
@@
-35,6
+40,7
@@
class Container {
/**
* @var ContainerBuilder
/**
* @var ContainerBuilder
+ * @return \Symfony\Component\DependencyInjection\ContainerBuilder
*/
public function createContainer() {
$civicrm_base_path = dirname(dirname(__DIR__));
*/
public function createContainer() {
$civicrm_base_path = dirname(dirname(__DIR__));
@@
-88,6
+94,8
@@
class Container {
/**
* @param \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
/**
* @param \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
+ * @param $magicFunctionProvider
+ *
* @return \Civi\API\Kernel
*/
public function createApiKernel($dispatcher, $magicFunctionProvider) {
* @return \Civi\API\Kernel
*/
public function createApiKernel($dispatcher, $magicFunctionProvider) {