PHP Class Autarky\Application

Inheritance: implements Symfony\Component\HttpKernel\HttpKernelInterface
Afficher le fichier Open project: autarky/framework Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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 ( )

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

addMiddleware() public méthode

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

alias() public méthode

See also: Autarky\Container\ContainerInterface::alias()
public alias ( )

boot() public méthode

Boot the application.
public boot ( ) : void
Résultat void

bootConsole() public méthode

Boot a console application.
public bootConsole ( ) : Application
Résultat Symfony\Component\Console\Application

checkProviderDependencies() protected méthode

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

config() public méthode

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
Résultat void

define() public méthode

See also: Autarky\Container\ContainerInterface::define()
public define ( )

getConfig() public méthode

Get the application's config store.
public getConfig ( ) : Autarky\Config\ConfigInterface
Résultat Autarky\Config\ConfigInterface

getContainer() public méthode

Get the application's container.
public getContainer ( ) : Autarky\Container\Container | Autarky\Container\ContainerInterface
Résultat Autarky\Container\Container | Autarky\Container\ContainerInterface

getEnvironment() public méthode

Get the current environment.
public getEnvironment ( ) : string
Résultat string

getErrorHandler() public méthode

Get the application's error handler.
public getErrorHandler ( ) : Autarky\Errors\ErrorHandlerManagerInterface
Résultat Autarky\Errors\ErrorHandlerManagerInterface

getProviders() public méthode

Get the application's providers.
public getProviders ( ) : string[]
Résultat string[] array of provider class names

getRequestStack() public méthode

Get the application's request stack.
public getRequestStack ( ) : Symfony\Component\HttpFoundation\RequestStack
Résultat Symfony\Component\HttpFoundation\RequestStack

getRouter() public méthode

Get the application's router.
public getRouter ( ) : Autarky\Routing\RouterInterface
Résultat Autarky\Routing\RouterInterface

handle() public méthode

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

invoke() public méthode

See also: Autarky\Container\ContainerInterface::invoke()
public invoke ( )

invokeConfigurator() protected méthode

Invoke a single configurator.
protected invokeConfigurator ( callable | string | autarky\ConfiguratorInterface $configurator ) : void
$configurator callable | string | autarky\ConfiguratorInterface
Résultat void

mount() public méthode

See also: Autarky\Routing\RouterInterface::mount()
public mount ( )

params() public méthode

See also: Autarky\Container\ContainerInterface::params()
public params ( )

registerProvider() protected méthode

Register a single service provider.
protected registerProvider ( Autarky\Providers\ProviderInterface $provider ) : void
$provider Autarky\Providers\ProviderInterface
Résultat void

registerProviders() protected méthode

Register all of the application's service providers.
protected registerProviders ( ) : void
Résultat void

resolve() public méthode

See also: Autarky\Container\ContainerInterface::resolve()
public resolve ( )

resolveKernel() protected méthode

Resolve the HTTP kernel.
protected resolveKernel ( ) : Symfony\Component\HttpKernel\HttpKernelInterface
Résultat Symfony\Component\HttpKernel\HttpKernelInterface

resolveStack() protected méthode

Resolve the stack builder.
protected resolveStack ( ) : Stack\Builder
Résultat Stack\Builder

route() public méthode

See also: Autarky\Routing\RouterInterface::addRoute()
public route ( )

run() public méthode

Run the application.
public run ( Request $request = null, boolean $send = true ) : Response
$request Symfony\Component\HttpFoundation\Request
$send boolean
Résultat Symfony\Component\HttpFoundation\Response

setConfig() public méthode

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

setContainer() public méthode

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

setEnvironment() public méthode

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

setErrorHandler() public méthode

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

share() public méthode

See also: Autarky\Container\ContainerInterface::share()
public share ( )

Property Details

$booted protected_oe property

protected bool $booted
Résultat boolean

$booting protected_oe property

protected bool $booting
Résultat boolean

$config protected_oe property

protected ConfigInterface,Autarky\Config $config
Résultat Autarky\Config\ConfigInterface

$configurators protected_oe property

protected SplDoublyLinkedList $configurators
Résultat SplDoublyLinkedList

$console protected_oe property

protected Application,Autarky\Console $console
Résultat Autarky\Console\Application

$container protected_oe property

protected ContainerInterface,Autarky\Container $container
Résultat Autarky\Container\ContainerInterface

$environment protected_oe property

protected Closure|string $environment
Résultat Closure | string

$errorHandler protected_oe property

protected ErrorHandlerManagerInterface,Autarky\Errors $errorHandler
Résultat Autarky\Errors\ErrorHandlerManagerInterface

$kernel protected_oe property

protected Kernel,Autarky\Http $kernel
Résultat Autarky\Http\Kernel

$middlewares protected_oe property

protected SplPriorityQueue $middlewares
Résultat SplPriorityQueue

$providers protected_oe property

The application's service providers.
protected array $providers
Résultat array

$requests protected_oe property

protected RequestStack,Symfony\Component\HttpFoundation $requests
Résultat Symfony\Component\HttpFoundation\RequestStack

$stack protected_oe property

protected Builder,Stack $stack
Résultat Stack\Builder