2021-05-10 00:23:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony package.
|
|
|
|
*
|
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
2022-07-01 07:39:49 +00:00
|
|
|
namespace RectorPrefix202207\Symfony\Component\DependencyInjection;
|
2021-05-10 00:23:30 +00:00
|
|
|
|
2022-07-01 07:39:49 +00:00
|
|
|
use RectorPrefix202207\Psr\Container\ContainerInterface as PsrContainerInterface;
|
|
|
|
use RectorPrefix202207\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|
|
|
use RectorPrefix202207\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
|
|
|
use RectorPrefix202207\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
|
|
|
* ContainerInterface is the interface implemented by service container classes.
|
|
|
|
*
|
|
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
|
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
|
|
|
*/
|
2022-06-07 08:22:29 +00:00
|
|
|
interface ContainerInterface extends PsrContainerInterface
|
2021-05-10 00:23:30 +00:00
|
|
|
{
|
|
|
|
public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0;
|
|
|
|
public const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
|
|
|
public const NULL_ON_INVALID_REFERENCE = 2;
|
|
|
|
public const IGNORE_ON_INVALID_REFERENCE = 3;
|
|
|
|
public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
2022-03-24 21:23:19 +00:00
|
|
|
public function set(string $id, ?object $service);
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
|
|
|
* @throws ServiceCircularReferenceException When a circular reference is detected
|
|
|
|
* @throws ServiceNotFoundException When the service is not defined
|
|
|
|
*
|
|
|
|
* @see Reference
|
|
|
|
*/
|
2022-03-24 21:23:19 +00:00
|
|
|
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) : ?object;
|
2022-02-14 01:03:53 +00:00
|
|
|
public function has(string $id) : bool;
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
|
|
|
* Check for whether or not a service has been initialized.
|
|
|
|
*/
|
2022-02-14 01:03:53 +00:00
|
|
|
public function initialized(string $id) : bool;
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
2022-02-28 10:23:34 +00:00
|
|
|
* @return array|bool|string|int|float|\UnitEnum|null
|
2021-05-10 00:23:30 +00:00
|
|
|
*
|
|
|
|
* @throws InvalidArgumentException if the parameter is not defined
|
|
|
|
*/
|
2021-12-10 10:22:23 +00:00
|
|
|
public function getParameter(string $name);
|
2022-02-14 01:03:53 +00:00
|
|
|
public function hasParameter(string $name) : bool;
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
2022-04-26 08:13:18 +00:00
|
|
|
* @param mixed[]|bool|string|int|float|\UnitEnum|null $value
|
2021-05-10 00:23:30 +00:00
|
|
|
*/
|
2021-12-10 10:22:23 +00:00
|
|
|
public function setParameter(string $name, $value);
|
2021-05-10 00:23:30 +00:00
|
|
|
}
|