annotate vendor/psr/container/src/ContainerInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@14 1 <?php
Chris@14 2 /**
Chris@14 3 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
Chris@14 4 */
Chris@14 5
Chris@14 6 namespace Psr\Container;
Chris@14 7
Chris@14 8 /**
Chris@14 9 * Describes the interface of a container that exposes methods to read its entries.
Chris@14 10 */
Chris@14 11 interface ContainerInterface
Chris@14 12 {
Chris@14 13 /**
Chris@14 14 * Finds an entry of the container by its identifier and returns it.
Chris@14 15 *
Chris@14 16 * @param string $id Identifier of the entry to look for.
Chris@14 17 *
Chris@14 18 * @throws NotFoundExceptionInterface No entry was found for **this** identifier.
Chris@14 19 * @throws ContainerExceptionInterface Error while retrieving the entry.
Chris@14 20 *
Chris@14 21 * @return mixed Entry.
Chris@14 22 */
Chris@14 23 public function get($id);
Chris@14 24
Chris@14 25 /**
Chris@14 26 * Returns true if the container can return an entry for the given identifier.
Chris@14 27 * Returns false otherwise.
Chris@14 28 *
Chris@14 29 * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
Chris@14 30 * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
Chris@14 31 *
Chris@14 32 * @param string $id Identifier of the entry to look for.
Chris@14 33 *
Chris@14 34 * @return bool
Chris@14 35 */
Chris@14 36 public function has($id);
Chris@14 37 }