PHP Класс Zend\Expressive\AppFactory
This factory acts as the general entry point for using Application in a
programmatic vs service-driven environment.
The Application instance returned is guaranteed to have a router, a
container, and an emitter stack; by default, the FastRoute router and the
ZF2 ServiceManager are used.
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
create ( Interop\Container\ContainerInterface $container = null, Zend\Expressive\Router\RouterInterface $router = null ) : Application |
Create and return an Application instance. |
|
Приватные методы
Метод |
Описание |
|
__construct ( ) |
Do not allow instantiation. |
|
Описание методов
create()
публичный статический Метод
Will inject the instance with the container and/or router when provided;
otherwise, it will use a ZF2 ServiceManager instance and the FastRoute
router bridge.
The factory also injects the Application with an Emitter\EmitterStack that
composes a SapiEmitter at the bottom of the stack (i.e., will execute last
when the stack is iterated).
public static create ( Interop\Container\ContainerInterface $container = null, Zend\Expressive\Router\RouterInterface $router = null ) : Application |
$container |
Interop\Container\ContainerInterface |
IoC container from which to
fetch middleware defined as services; defaults to a ServiceManager
instance |
$router |
Zend\Expressive\Router\RouterInterface |
Router implementation to use;
defaults to the FastRoute router bridge. |
Результат |
Application |
|