3 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
6 namespace Interop\Container;
8 use Interop\Container\Exception\ContainerException;
9 use Interop\Container\Exception\NotFoundException;
12 * Describes the interface of a container that exposes methods to read its entries.
14 interface ContainerInterface
17 * Finds an entry of the container by its identifier and returns it.
19 * @param string $id Identifier of the entry to look for.
21 * @throws NotFoundException No entry was found for this identifier.
22 * @throws ContainerException Error while retrieving the entry.
24 * @return mixed Entry.
26 public function get($id);
29 * Returns true if the container can return an entry for the given identifier.
30 * Returns false otherwise.
32 * @param string $id Identifier of the entry to look for.
36 public function has($id);