Skip to content

Instantly share code, notes, and snippets.

@kevinquillen
Created February 18, 2025 20:27
Show Gist options
  • Save kevinquillen/3210c4ca81ae530f3904a999ed82e6d5 to your computer and use it in GitHub Desktop.
Save kevinquillen/3210c4ca81ae530f3904a999ed82e6d5 to your computer and use it in GitHub Desktop.
Non autowired class.
class ApiClientFactory {
/**
* The client factory service.
*
* @var ClientFactory
*/
protected $clientFactory;
/**
* The domain negotiator saervice.
*
* @var DomainNegotiator
*/
protected $domainNegotiator;
/**
* The config factory service.
*
* @var ConfigFactoryInterface
*/
protected $configFactory;
/**
* The logger factory service.
*
* @var LoggerChannelFactoryInterface
*/
protected $logger;
/**
* {@inheritdoc}
*/
public function __construct(
ClientFactory $clientFactory,
DomainNegotiator $domainNegotiator,
ConfigFactoryInterface $configFactory,
LoggerChannelFactoryInterface $loggerChannelFactory,
) {
$this->clientFactory = $clientFactory;
$this->domainNegotiator = $domainNegotiator;
$this->configFactory = $configFactory;
$this->logger = $loggerChannelFactory;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment