PHP 클래스 Autarky\Application

상속: implements Symfony\Component\HttpKernel\HttpKernelInterface
파일 보기 프로젝트 열기: autarky/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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