Copied!

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

  • example new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi')) Use with {@see \ServiceMethodsSubscriberTrait} to mark a method's return type as a subscribed service.
  • author Kevin Bond
  • attribute Attribute ( 4)
CloneableFinalInstantiable
Properties
public array $attributes
 
  • var object[]
public ?string $key
public bool $nullable
public ?string $type
Methods
public __construct(?string $key = NULL, ?string $type = NULL, bool $nullable = false, object|array $attributes = [])
 
  • param string|null $key The key to use for the service
  • param class-string|null $type The service class
  • param bool $nullable Whether the service is optional
  • param object|object[] $attributes One or more dependency injection attributes to use
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration