PHP Class blink\core\Application

Inheritance: extends blink\core\ServiceLocator
Afficher le fichier Open project: bixuehujin/blink Class Usage Examples

Méthodes publiques

Свойство Type Description
$commands string[] Available console commands.
$controllerNamespace
$currentRequest
$debug
$environment string The environment that the application is running on. dev, prod or test.
$name string The name for the application.
$plugins array The installed application plugins.
$root string The root path for the application.
$routes
$runtime
$server
$services array Application service definitions.
$timezone

Protected Properties

Свойство Type Description
$bootstrapped
$dispatcher
$lastError
$refreshing

Méthodes publiques

Méthode Description
bootstrap ( )
consoleCommands ( ) : array Returns all console commands definitions.
defaultCommands ( ) : array Returns the default console commands definitions.
defaultServices ( )
handleRequest ( blink\http\Request $request ) : mixed
init ( )
makeRequest ( $config = [] )
route ( $method, $route, $handler )
shutdown ( ) Shutdown the application.

Méthodes protégées

Méthode Description
afterAction ( $action, $request, $response )
beforeAction ( $action, $request )
createAction ( $handler )
dispatch ( $request )
exceptionToArray ( $exception )
exec ( $request, $response )
formatException ( $e, $response )
initializeConfig ( )
internalServerError ( )
refreshServices ( )
registerPlugins ( )
registerRoutes ( )
registerServices ( )
runAction ( $action, $args, $request, $response )

Method Details

afterAction() protected méthode

protected afterAction ( $action, $request, $response )

beforeAction() protected méthode

protected beforeAction ( $action, $request )

bootstrap() public méthode

public bootstrap ( )

consoleCommands() public méthode

Returns all console commands definitions.
public consoleCommands ( ) : array
Résultat array

createAction() protected méthode

protected createAction ( $handler )

defaultCommands() public méthode

Returns the default console commands definitions.
public defaultCommands ( ) : array
Résultat array

defaultServices() public méthode

public defaultServices ( )

dispatch() protected méthode

protected dispatch ( $request )

exceptionToArray() protected méthode

protected exceptionToArray ( $exception )

exec() protected méthode

protected exec ( $request, $response )

formatException() protected méthode

protected formatException ( $e, $response )

handleRequest() public méthode

public handleRequest ( blink\http\Request $request ) : mixed
$request blink\http\Request
Résultat mixed

init() public méthode

public init ( )

initializeConfig() protected méthode

protected initializeConfig ( )

internalServerError() protected méthode

protected internalServerError ( )

makeRequest() public méthode

public makeRequest ( $config = [] )

refreshServices() protected méthode

protected refreshServices ( )

registerPlugins() protected méthode

protected registerPlugins ( )

registerRoutes() protected méthode

protected registerRoutes ( )

registerServices() protected méthode

protected registerServices ( )

route() public méthode

public route ( $method, $route, $handler )

runAction() protected méthode

protected runAction ( $action, $args, $request, $response )

shutdown() public méthode

Shutdown the application.
public shutdown ( )

Property Details

$bootstrapped protected_oe property

protected $bootstrapped

$commands public_oe property

Available console commands.
public string[] $commands
Résultat string[]

$controllerNamespace public_oe property

public $controllerNamespace

$currentRequest public_oe property

public $currentRequest

$debug public_oe property

public $debug

$dispatcher protected_oe property

protected $dispatcher

$environment public_oe property

The environment that the application is running on. dev, prod or test.
public string $environment
Résultat string

$lastError protected_oe property

protected $lastError

$name public_oe property

The name for the application.
public string $name
Résultat string

$plugins public_oe property

The installed application plugins.
public array $plugins
Résultat array

$refreshing protected_oe property

protected $refreshing

$root public_oe property

The root path for the application.
public string $root
Résultat string

$routes public_oe property

public $routes

$runtime public_oe property

public $runtime

$server public_oe property

public $server

$services public_oe property

Application service definitions.
public array $services
Résultat array

$timezone public_oe property

public $timezone