Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-31 03:56:32 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-01-09 00:13:30 +0300
commit8f342d0fb3f5661cb7fc1cafeabf93684ac478f8 (patch)
tree2d1f9efad0ef9a1d9e7a78817acae4350d04bcbb /core/Container
parentb65ca1a727f96f4a32c26000f884e15bdba9fe54 (diff)
Added a `StaticContainer::get()` method to avoid boilerplate
Diffstat (limited to 'core/Container')
-rw-r--r--core/Container/StaticContainer.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Container/StaticContainer.php b/core/Container/StaticContainer.php
index 048ba8a687..874851acde 100644
--- a/core/Container/StaticContainer.php
+++ b/core/Container/StaticContainer.php
@@ -76,4 +76,16 @@ class StaticContainer
{
self::$environment = $environment;
}
+
+ /**
+ * Proxy to Container::get()
+ *
+ * @param string $name Container entry name.
+ * @return mixed
+ * @throws \DI\NotFoundException
+ */
+ public static function get($name)
+ {
+ return self::getContainer()->get($name);
+ }
}