PHP Класс Autarky\Application

Наследование: implements Symfony\Component\HttpKernel\HttpKernelInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$booted boolean
$booting boolean
$config Autarky\Config\ConfigInterface
$configurators SplDoublyLinkedList
$console Autarky\Console\Application
$container Autarky\Container\ContainerInterface
$environment Closure | string
$errorHandler Autarky\Errors\ErrorHandlerManagerInterface
$kernel Autarky\Http\Kernel
$middlewares SplPriorityQueue
$providers array The application's service providers.
$requests Symfony\Component\HttpFoundation\RequestStack
$stack Stack\Builder

Открытые методы

Метод Описание
__construct ( Closure | string $environment, array $providers ) Construct a new application instance.
addMiddleware ( Closure | string | array $middleware, integer $priority = null ) Add a middleware to the application.
alias ( )
boot ( ) : void Boot the application.
bootConsole ( ) : Application Boot a console application.
config ( callable | string | autarky\ConfiguratorInterface $configurator ) : void Push a configurator on top of the stack. The configurators will be executed when the application is booted. If the application is already booted, the configurator will be executed at once.
define ( )
getConfig ( ) : Autarky\Config\ConfigInterface Get the application's config store.
getContainer ( ) : Autarky\Container\Container | Autarky\Container\ContainerInterface Get the application's container.
getEnvironment ( ) : string Get the current environment.
getErrorHandler ( ) : Autarky\Errors\ErrorHandlerManagerInterface Get the application's error handler.
getProviders ( ) : string[] Get the application's providers.
getRequestStack ( ) : Symfony\Component\HttpFoundation\RequestStack Get the application's request stack.
getRouter ( ) : Autarky\Routing\RouterInterface Get the application's router.
handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $throw = false )
invoke ( )
mount ( )
params ( )
resolve ( )
route ( )
run ( Request $request = null, boolean $send = true ) : Response Run the application.
setConfig ( Autarky\Config\ConfigInterface $config ) Set the application's config store.
setContainer ( Autarky\Container\ContainerInterface $container ) Set the application's container.
setEnvironment ( string $environment ) Set the environment of the application. Has to be called before boot().
setErrorHandler ( Autarky\Errors\ErrorHandlerManagerInterface $errorHandler ) Set the application's error handler.
share ( )

Защищенные методы

Метод Описание
checkProviderDependencies ( Autarky\Providers\DependantProviderInterface $provider )
invokeConfigurator ( callable | string | autarky\ConfiguratorInterface $configurator ) : void Invoke a single configurator.
registerProvider ( Autarky\Providers\ProviderInterface $provider ) : void Register a single service provider.
registerProviders ( ) : void Register all of the application's service providers.
resolveKernel ( ) : Symfony\Component\HttpKernel\HttpKernelInterface Resolve the HTTP kernel.
resolveStack ( ) : Stack\Builder Resolve the stack builder.

Описание методов

__construct() публичный метод

Construct a new application instance.
public __construct ( Closure | string $environment, array $providers )
$environment Closure | string
$providers array

addMiddleware() публичный метод

Add a middleware to the application.
public addMiddleware ( Closure | string | array $middleware, integer $priority = null )
$middleware Closure | string | array
$priority integer

alias() публичный метод

См. также: Autarky\Container\ContainerInterface::alias()
public alias ( )

boot() публичный метод

Boot the application.
public boot ( ) : void
Результат void

bootConsole() публичный метод

Boot a console application.
public bootConsole ( ) : Application
Результат Symfony\Component\Console\Application

checkProviderDependencies() защищенный метод

protected checkProviderDependencies ( Autarky\Providers\DependantProviderInterface $provider )
$provider Autarky\Providers\DependantProviderInterface

config() публичный метод

Push a configurator on top of the stack. The configurators will be executed when the application is booted. If the application is already booted, the configurator will be executed at once.
public config ( callable | string | autarky\ConfiguratorInterface $configurator ) : void
$configurator callable | string | autarky\ConfiguratorInterface
Результат void

define() публичный метод

См. также: Autarky\Container\ContainerInterface::define()
public define ( )

getConfig() публичный метод

Get the application's config store.
public getConfig ( ) : Autarky\Config\ConfigInterface
Результат Autarky\Config\ConfigInterface

getContainer() публичный метод

Get the application's container.
public getContainer ( ) : Autarky\Container\Container | Autarky\Container\ContainerInterface
Результат Autarky\Container\Container | Autarky\Container\ContainerInterface

getEnvironment() публичный метод

Get the current environment.
public getEnvironment ( ) : string
Результат string

getErrorHandler() публичный метод

Get the application's error handler.
public getErrorHandler ( ) : Autarky\Errors\ErrorHandlerManagerInterface
Результат Autarky\Errors\ErrorHandlerManagerInterface

getProviders() публичный метод

Get the application's providers.
public getProviders ( ) : string[]
Результат string[] array of provider class names

getRequestStack() публичный метод

Get the application's request stack.
public getRequestStack ( ) : Symfony\Component\HttpFoundation\RequestStack
Результат Symfony\Component\HttpFoundation\RequestStack

getRouter() публичный метод

Get the application's router.
public getRouter ( ) : Autarky\Routing\RouterInterface
Результат Autarky\Routing\RouterInterface

handle() публичный метод

public handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $throw = false )
$request Symfony\Component\HttpFoundation\Request

invoke() публичный метод

См. также: Autarky\Container\ContainerInterface::invoke()
public invoke ( )

invokeConfigurator() защищенный метод

Invoke a single configurator.
protected invokeConfigurator ( callable | string | autarky\ConfiguratorInterface $configurator ) : void
$configurator callable | string | autarky\ConfiguratorInterface
Результат void

mount() публичный метод

См. также: Autarky\Routing\RouterInterface::mount()
public mount ( )

params() публичный метод

См. также: Autarky\Container\ContainerInterface::params()
public params ( )

registerProvider() защищенный метод

Register a single service provider.
protected registerProvider ( Autarky\Providers\ProviderInterface $provider ) : void
$provider Autarky\Providers\ProviderInterface
Результат void

registerProviders() защищенный метод

Register all of the application's service providers.
protected registerProviders ( ) : void
Результат void

resolve() публичный метод

См. также: Autarky\Container\ContainerInterface::resolve()
public resolve ( )

resolveKernel() защищенный метод

Resolve the HTTP kernel.
protected resolveKernel ( ) : Symfony\Component\HttpKernel\HttpKernelInterface
Результат Symfony\Component\HttpKernel\HttpKernelInterface

resolveStack() защищенный метод

Resolve the stack builder.
protected resolveStack ( ) : Stack\Builder
Результат Stack\Builder

route() публичный метод

См. также: Autarky\Routing\RouterInterface::addRoute()
public route ( )

run() публичный метод

Run the application.
public run ( Request $request = null, boolean $send = true ) : Response
$request Symfony\Component\HttpFoundation\Request
$send boolean
Результат Symfony\Component\HttpFoundation\Response

setConfig() публичный метод

Set the application's config store.
public setConfig ( Autarky\Config\ConfigInterface $config )
$config Autarky\Config\ConfigInterface

setContainer() публичный метод

Set the application's container.
public setContainer ( Autarky\Container\ContainerInterface $container )
$container Autarky\Container\ContainerInterface

setEnvironment() публичный метод

Set the environment of the application. Has to be called before boot().
public setEnvironment ( string $environment )
$environment string

setErrorHandler() публичный метод

Set the application's error handler.
public setErrorHandler ( Autarky\Errors\ErrorHandlerManagerInterface $errorHandler )
$errorHandler Autarky\Errors\ErrorHandlerManagerInterface

share() публичный метод

См. также: Autarky\Container\ContainerInterface::share()
public share ( )

Описание свойств

$booted защищенное свойство

protected bool $booted
Результат boolean

$booting защищенное свойство

protected bool $booting
Результат boolean

$config защищенное свойство

protected ConfigInterface,Autarky\Config $config
Результат Autarky\Config\ConfigInterface

$configurators защищенное свойство

protected SplDoublyLinkedList $configurators
Результат SplDoublyLinkedList

$console защищенное свойство

protected Application,Autarky\Console $console
Результат Autarky\Console\Application

$container защищенное свойство

protected ContainerInterface,Autarky\Container $container
Результат Autarky\Container\ContainerInterface

$environment защищенное свойство

protected Closure|string $environment
Результат Closure | string

$errorHandler защищенное свойство

protected ErrorHandlerManagerInterface,Autarky\Errors $errorHandler
Результат Autarky\Errors\ErrorHandlerManagerInterface

$kernel защищенное свойство

protected Kernel,Autarky\Http $kernel
Результат Autarky\Http\Kernel

$middlewares защищенное свойство

protected SplPriorityQueue $middlewares
Результат SplPriorityQueue

$providers защищенное свойство

The application's service providers.
protected array $providers
Результат array

$requests защищенное свойство

protected RequestStack,Symfony\Component\HttpFoundation $requests
Результат Symfony\Component\HttpFoundation\RequestStack

$stack защищенное свойство

protected Builder,Stack $stack
Результат Stack\Builder