summaryrefslogtreecommitdiff
path: root/vendor/psr/container/src/ContainerInterface.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2017-12-15 13:27:25 -0800
committerFrédéric Guillot <fred@kanboard.net>2017-12-15 13:27:25 -0800
commit8e6476b4028e44687e10bf7fb2617a2d2fff97d2 (patch)
treef010db02cb0ff016bdc806a0a87e1a4b21946f0a /vendor/psr/container/src/ContainerInterface.php
parenta93b8e10f5954be0853eec693c13e84c4bd9e6f2 (diff)
Update composer dependencies
Diffstat (limited to 'vendor/psr/container/src/ContainerInterface.php')
-rw-r--r--vendor/psr/container/src/ContainerInterface.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/psr/container/src/ContainerInterface.php b/vendor/psr/container/src/ContainerInterface.php
new file mode 100644
index 00000000..c3a7206f
--- /dev/null
+++ b/vendor/psr/container/src/ContainerInterface.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
+ */
+
+namespace Psr\Container;
+
+/**
+ * Describes the interface of a container that exposes methods to read its entries.
+ */
+interface ContainerInterface
+{
+ /**
+ * Finds an entry of the container by its identifier and returns it.
+ *
+ * @param string $id Identifier of the entry to look for.
+ *
+ * @throws NotFoundExceptionInterface No entry was found for **this** identifier.
+ * @throws ContainerExceptionInterface Error while retrieving the entry.
+ *
+ * @return mixed Entry.
+ */
+ public function get($id);
+
+ /**
+ * Returns true if the container can return an entry for the given identifier.
+ * Returns false otherwise.
+ *
+ * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
+ * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
+ *
+ * @param string $id Identifier of the entry to look for.
+ *
+ * @return bool
+ */
+ public function has($id);
+}