Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Latest commit

 

History

History
33 lines (21 loc) · 665 Bytes

ApiExceptionMiddlewareFactory.md

File metadata and controls

33 lines (21 loc) · 665 Bytes

ApiExceptionMiddlewareFactory

without name (default)

<?php

use Chubbyphp\ApiHttp\ServiceFactory\ApiExceptionMiddlewareFactory;
use Psr\Container\ContainerInterface;

/** @var ContainerInterface $container */
$container = ...;

$factory = new ApiExceptionMiddlewareFactory();

$apiExceptionMiddleware = $factory($container);

with name default

<?php

use Chubbyphp\ApiHttp\ServiceFactory\ApiExceptionMiddlewareFactory;
use Psr\Container\ContainerInterface;

/** @var ContainerInterface $container */
$container = ...;

$factory = [ApiExceptionMiddlewareFactory::class, 'default'];

$apiExceptionMiddleware = $factory($container);