| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of the Symfony package. |
| 5 |
* |
| 6 |
* (c) Fabien Potencier <fabien@symfony.com> |
| 7 |
* |
| 8 |
* For the full copyright and license information, please view the LICENSE |
| 9 |
* file that was distributed with this source code. |
| 10 |
*/ |
| 11 |
namespace YoastSEO_Vendor\Symfony\Component\DependencyInjection; |
| 12 |
|
| 13 |
use YoastSEO_Vendor\Psr\Container\ContainerInterface as PsrContainerInterface; |
| 14 |
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; |
| 15 |
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; |
| 16 |
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; |
| 17 |
/** |
| 18 |
* ContainerInterface is the interface implemented by service container classes. |
| 19 |
* |
| 20 |
* @author Fabien Potencier <fabien@symfony.com> |
| 21 |
* @author Johannes M. Schmitt <schmittjoh@gmail.com> |
| 22 |
*/ |
| 23 |
interface ContainerInterface extends \YoastSEO_Vendor\Psr\Container\ContainerInterface |
| 24 |
{ |
| 25 |
const EXCEPTION_ON_INVALID_REFERENCE = 1; |
| 26 |
const NULL_ON_INVALID_REFERENCE = 2; |
| 27 |
const IGNORE_ON_INVALID_REFERENCE = 3; |
| 28 |
const IGNORE_ON_UNINITIALIZED_REFERENCE = 4; |
| 29 |
/** |
| 30 |
* Sets a service. |
| 31 |
* |
| 32 |
* @param string $id The service identifier |
| 33 |
* @param object|null $service The service instance |
| 34 |
*/ |
| 35 |
public function set($id, $service); |
| 36 |
/** |
| 37 |
* Gets a service. |
| 38 |
* |
| 39 |
* @param string $id The service identifier |
| 40 |
* @param int $invalidBehavior The behavior when the service does not exist |
| 41 |
* |
| 42 |
* @return object|null The associated service |
| 43 |
* |
| 44 |
* @throws ServiceCircularReferenceException When a circular reference is detected |
| 45 |
* @throws ServiceNotFoundException When the service is not defined |
| 46 |
* |
| 47 |
* @see Reference |
| 48 |
*/ |
| 49 |
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); |
| 50 |
/** |
| 51 |
* Returns true if the given service is defined. |
| 52 |
* |
| 53 |
* @param string $id The service identifier |
| 54 |
* |
| 55 |
* @return bool true if the service is defined, false otherwise |
| 56 |
*/ |
| 57 |
public function has($id); |
| 58 |
/** |
| 59 |
* Check for whether or not a service has been initialized. |
| 60 |
* |
| 61 |
* @param string $id |
| 62 |
* |
| 63 |
* @return bool true if the service has been initialized, false otherwise |
| 64 |
*/ |
| 65 |
public function initialized($id); |
| 66 |
/** |
| 67 |
* Gets a parameter. |
| 68 |
* |
| 69 |
* @param string $name The parameter name |
| 70 |
* |
| 71 |
* @return mixed The parameter value |
| 72 |
* |
| 73 |
* @throws InvalidArgumentException if the parameter is not defined |
| 74 |
*/ |
| 75 |
public function getParameter($name); |
| 76 |
/** |
| 77 |
* Checks if a parameter exists. |
| 78 |
* |
| 79 |
* @param string $name The parameter name |
| 80 |
* |
| 81 |
* @return bool The presence of parameter in container |
| 82 |
*/ |
| 83 |
public function hasParameter($name); |
| 84 |
/** |
| 85 |
* Sets a parameter. |
| 86 |
* |
| 87 |
* @param string $name The parameter name |
| 88 |
* @param mixed $value The parameter value |
| 89 |
*/ |
| 90 |
public function setParameter($name, $value); |
| 91 |
} |
| 92 |
|