Properties

$config

$config : mixed

Application config

Type

mixed

$autoloader

$autoloader : mixed

Autoloader

Type

mixed

Methods

__construct()

__construct() : \Pop\Application

Constructor

Instantiate an application object

Optional parameters are a service locator instance, a router instance, an event manager instance or a configuration object or array

Returns

\Pop\Application

bootstrap()

bootstrap(mixed  $autoloader = null) : \Pop\Application

Bootstrap the application

Parameters

mixed $autoloader

Returns

\Pop\Application

mergeConfig()

mergeConfig(mixed  $config, boolean  $replace = false) : \Pop\Application

Merge new or altered config values with the existing config values

Parameters

mixed $config
boolean $replace

Returns

\Pop\Application

init()

init() : \Pop\Application

Initialize the application

Returns

\Pop\Application

autoloader()

autoloader() : mixed

Get the autoloader object

Returns

mixed

config()

config() : mixed

Access application config

Returns

mixed

router()

router() : \Pop\Router\Router

Access the application router

Returns

\Pop\Router\Router

modules()

modules() : \Pop\Module\Manager

Access all application module configs

Returns

\Pop\Module\Manager

loadConfig()

loadConfig(mixed  $config) : \Pop\Application

Load application config

Parameters

mixed $config

Throws

\InvalidArgumentException

Returns

\Pop\Application

registerAutoloader()

registerAutoloader(mixed  $autoloader) : \Pop\Application

Register the autoloader object

Parameters

mixed $autoloader

Throws

\Pop\Exception

Returns

\Pop\Application

module()

module(string  $name) : \Pop\Module\ModuleInterface

Access a module object

Parameters

string $name

Returns

\Pop\Module\ModuleInterface

register()

register(string  $name, mixed  $module) : \Pop\Application

Register a module with the application object

Parameters

string $name
mixed $module

Returns

\Pop\Application

unregister()

unregister(string  $name) : \Pop\Application

Unregister a module object

Parameters

string $name

Returns

\Pop\Application

isRegistered()

isRegistered(string  $name) : boolean

Determine whether a module is registered with the application object

Parameters

string $name

Returns

boolean

addRoute()

addRoute(string  $route, mixed  $controller) : \Pop\Application

Add a route

Parameters

string $route
mixed $controller

Returns

\Pop\Application

addRoutes()

addRoutes(array  $routes) : \Pop\Application

Add routes

Parameters

array $routes

Returns

\Pop\Application

setService()

setService(string  $name, mixed  $service) : \Pop\Application

Set a service

Parameters

string $name
mixed $service

Returns

\Pop\Application

getService()

getService(string  $name) : mixed

Get a service

Parameters

string $name

Returns

mixed

removeService()

removeService(string  $name) : \Pop\Application

Remove a service

Parameters

string $name

Returns

\Pop\Application

on()

on(string  $name, mixed  $action, integer  $priority) : \Pop\Application

Attach an event. Default hook-points are:

app.init app.route.pre app.route.post app.dispatch.pre app.dispatch.post app.error

Parameters

string $name
mixed $action
integer $priority

Returns

\Pop\Application

off()

off(string  $name, mixed  $action) : \Pop\Application

Detach an event. Default hook-points are:

app.init app.route.pre app.route.post app.dispatch.pre app.dispatch.post app.error

Parameters

string $name
mixed $action

Returns

\Pop\Application

trigger()

trigger(string  $name, array  $args = array()) : \Pop\Application

Trigger an event

Parameters

string $name
array $args

Returns

\Pop\Application

run()

run() : void

Run the application.

__set()

__set(string  $name, mixed  $value) : \Pop\Application

Set a value in the array

Parameters

string $name
mixed $value

Returns

\Pop\Application

__get()

__get(string  $name) : mixed

Get a value from the array

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Determine if a value exists

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : \Pop\Application

Unset a value from the array

Parameters

string $name

Returns

\Pop\Application

offsetSet()

offsetSet(string  $offset, mixed  $value) : \Pop\Application

Set a value in the array

Parameters

string $offset
mixed $value

Returns

\Pop\Application

offsetGet()

offsetGet(string  $offset) : mixed

Get a value from the array

Parameters

string $offset

Returns

mixed

offsetExists()

offsetExists(string  $offset) : boolean

Determine if a value exists

Parameters

string $offset

Returns

boolean

offsetUnset()

offsetUnset(string  $offset) : \Pop\Application

Unset a value from the array

Parameters

string $offset

Returns

\Pop\Application