Documentation

SubscribedService
in package

FinalYes

For use as the return value for {@see ServiceSubscriberInterface}.

Tags
example

new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi'))

Use with ServiceMethodsSubscriberTrait to mark a method's return type as a subscribed service.

author

Kevin Bond kevinbond@gmail.com

Table of Contents

Properties

$attributes  : array<string|int, object>
$key  : string|null
$nullable  : bool
$type  : string|null

Methods

__construct()  : mixed

Attributes

#[Attribute]

#[Attribute]

Properties

Methods

__construct()

public __construct([string|null $key = null ][, class-string|null $type = null ][, bool $nullable = false ][, object|array<string|int, object> $attributes = [] ]) : mixed
Parameters
$key : string|null = null

The key to use for the service

$type : class-string|null = null

The service class

$nullable : bool = false

Whether the service is optional

$attributes : object|array<string|int, object> = []

One or more dependency injection attributes to use


        
On this page

Search results