class Framework (View source)

Main communication channel with the framework

Methods

__construct(Container $container)

Constructor

boolean
debugging()

Get whether WordPress is in debug mode

boolean
isBooted()

Get whether the framework has been booted

Container
getContainer()

Get the IoC container instance

void
boot(array $config = [])

Boot the framework.

void
facade(string $alias, string $facade_class)

Register a facade class

mixed|null
resolve(string $key)

Resolve a dependency from the IoC container

object
instantiate(string $class)

Create and return a class instance

void
respond(ResponseInterface $response)

Send output based on a response object

Details

__construct(Container $container)

Constructor

Parameters

Container $container

boolean debugging()

Get whether WordPress is in debug mode

Return Value

boolean

boolean isBooted()

Get whether the framework has been booted

Return Value

boolean

Container getContainer()

Get the IoC container instance

Return Value

Container

void boot(array $config = [])

Boot the framework.

WordPress' 'after_setup_theme' action is a good place to call this.

Parameters

array $config

Return Value

void

Exceptions

Exception

void facade(string $alias, string $facade_class)

Register a facade class

Parameters

string $alias
string $facade_class

Return Value

void

mixed|null resolve(string $key)

Resolve a dependency from the IoC container

Parameters

string $key

Return Value

mixed|null

Exceptions

Exception

object instantiate(string $class)

Create and return a class instance

Parameters

string $class

Return Value

object

Exceptions

Exception

void respond(ResponseInterface $response)

Send output based on a response object

Parameters

ResponseInterface $response

Return Value

void

Exceptions

Exception