aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di/service_collection.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/di/service_collection.php')
-rw-r--r--phpBB/phpbb/di/service_collection.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
index 82ca9bf679..8e9175e204 100644
--- a/phpBB/phpbb/di/service_collection.php
+++ b/phpBB/phpbb/di/service_collection.php
@@ -26,6 +26,11 @@ class service_collection extends \ArrayObject
protected $container;
/**
+ * @var array
+ */
+ protected $service_classes;
+
+ /**
* Constructor
*
* @param ContainerInterface $container Container object
@@ -33,6 +38,7 @@ class service_collection extends \ArrayObject
public function __construct(ContainerInterface $container)
{
$this->container = $container;
+ $this->service_classes = array();
}
/**
@@ -76,4 +82,25 @@ class service_collection extends \ArrayObject
{
$this->offsetSet($name, null);
}
+
+ /**
+ * Add a service's class to the collection
+ *
+ * @param string $service_id
+ * @param string $class
+ */
+ public function add_service_class($service_id, $class)
+ {
+ $this->service_classes[$service_id] = $class;
+ }
+
+ /**
+ * Get services' classes
+ *
+ * @return array
+ */
+ public function get_service_classes()
+ {
+ return $this->service_classes;
+ }
}