function SubscribedService::__construct
Parameters
string|null $key The key to use for the service:
class-string|null $type The service class:
bool $nullable Whether the service is optional:
object|object[] $attributes One or more dependency injection attributes to use:
File
-
vendor/
symfony/ service-contracts/ Attribute/ SubscribedService.php, line 39
Class
- SubscribedService
- For use as the return value for { @example new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi'))
Namespace
Symfony\Contracts\Service\AttributeCode
public function __construct(?string $key = null, ?string $type = null, bool $nullable = false, array|object $attributes = []) {
$this->attributes = \is_array($attributes) ? $attributes : [
$attributes,
];
}