Overview

Namespaces

  • Autarky
    • Config
      • Loaders
    • Console
    • Container
      • Exception
      • Factory
      • Proxy
    • Database
    • Errors
    • Events
    • Files
    • Http
    • Logging
    • Providers
    • Routing
      • Events
    • Testing
    • TwigTemplating
      • Extensions
    • Utils

Classes

  • Application
  • Provider

Interfaces

  • ConfiguratorInterface
  • Overview
  • Namespace
  • Class

Class Application

The main application of the framework.

Autarky\Application implements Symfony\Component\HttpKernel\HttpKernelInterface
Namespace: Autarky
Located at Application.php
Methods summary
public
# __construct( Closure|string $environment, array $providers )

Construct a new application instance.

Construct a new application instance.

Parameters

$environment
$providers
public
# config( callable|string|Autarky\ConfiguratorInterface $configurator )

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.

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.

Parameters

$configurator
protected
# invokeConfigurator( callable|string|Autarky\ConfiguratorInterface $configurator )

Invoke a single configurator.

Invoke a single configurator.

Parameters

$configurator
public
# setEnvironment( string $environment )

Set the environment of the application. Has to be called before boot().

Set the environment of the application. Has to be called before boot().

Parameters

$environment
public string
# getEnvironment( )

Get the current environment.

Get the current environment.

Returns

string
public string[]
# getProviders( )

Get the application's providers.

Get the application's providers.

Returns

string[]
array of provider class names
public
# setErrorHandler( Autarky\Errors\ErrorHandlerManagerInterface $errorHandler )

Set the application's error handler.

Set the application's error handler.

Parameters

$errorHandler
public Autarky\Errors\ErrorHandlerManagerInterface
# getErrorHandler( )

Get the application's error handler.

Get the application's error handler.

Returns

Autarky\Errors\ErrorHandlerManagerInterface
public
# setContainer( Autarky\Container\ContainerInterface $container )

Set the application's container.

Set the application's container.

Parameters

$container
public Autarky\Container\Container|Autarky\Container\ContainerInterface
# getContainer( )

Get the application's container.

Get the application's container.

Returns

Autarky\Container\Container|Autarky\Container\ContainerInterface
public
# setConfig( Autarky\Config\ConfigInterface $config )

Set the application's config store.

Set the application's config store.

Parameters

$config
public Autarky\Config\ConfigInterface
# getConfig( )

Get the application's config store.

Get the application's config store.

Returns

Autarky\Config\ConfigInterface
public Autarky\Routing\RouterInterface
# getRouter( )

Get the application's router.

Get the application's router.

Returns

Autarky\Routing\RouterInterface
public Symfony\Component\HttpFoundation\RequestStack
# getRequestStack( )

Get the application's request stack.

Get the application's request stack.

Returns

Symfony\Component\HttpFoundation\RequestStack
public
# addMiddleware( Closure|string|array $middleware, integer $priority = null )

Add a middleware to the application.

Add a middleware to the application.

Parameters

$middleware
$priority
public Symfony\Component\Console\Application
# bootConsole( )

Boot a console application.

Boot a console application.

Returns

Symfony\Component\Console\Application
public
# boot( )

Boot the application.

Boot the application.

protected
# registerProviders( )

Register all of the application's service providers.

Register all of the application's service providers.

protected
# registerProvider( Autarky\Providers\ProviderInterface $provider )

Register a single service provider.

Register a single service provider.

Parameters

$provider
protected
# checkProviderDependencies( Autarky\Providers\DependantProviderInterface $provider )
protected Stack\Builder
# resolveStack( )

Resolve the stack builder.

Resolve the stack builder.

Returns

Stack\Builder
protected Symfony\Component\HttpKernel\HttpKernelInterface
# resolveKernel( )

Resolve the HTTP kernel.

Resolve the HTTP kernel.

Returns

Symfony\Component\HttpKernel\HttpKernelInterface
public Symfony\Component\HttpFoundation\Response
# run( Symfony\Component\HttpFoundation\Request $request = null, boolean $send = true )

Run the application.

Run the application.

Parameters

$request
$send

Returns

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

See

Autarky\Container\ContainerInterface::resolve()
public
# define( )

See

Autarky\Container\ContainerInterface::define()
public
# share( )

See

Autarky\Container\ContainerInterface::share()
public
# alias( )

See

Autarky\Container\ContainerInterface::alias()
public
# params( )

See

Autarky\Container\ContainerInterface::params()
public
# invoke( )

See

Autarky\Container\CallableInvokerInterface::invoke()
public
# route( )

See

Autarky\Routing\RouterInterface::addRoute()
Constants summary
string VERSION

The framework version.

The framework version.

# '0.10.0'
Properties summary
protected array $providers

The application's service providers.

The application's service providers.

# []
protected SplPriorityQueue $middlewares
#
protected Autarky\Http\Kernel $kernel
#
protected Stack\Builder $stack
#
protected Autarky\Config\ConfigInterface $config
#
protected Autarky\Container\ContainerInterface $container
#
protected Autarky\Errors\ErrorHandlerManagerInterface $errorHandler
#
protected Autarky\Console\Application $console
#
protected Closure|string $environment
#
protected boolean $booting
# false
protected boolean $booted
# false
protected SplDoublyLinkedList $configurators
#
protected Symfony\Component\HttpFoundation\RequestStack $requests
#
Autarky Framework API documentation generated by ApiGen