Properties

$config

$config : 

Application config

mixed

Type

$config

$config : mixed

Application config

Type

mixed

$autoloader

$autoloader : mixed

Autoloader

Type

mixed

Methods

config()

config() : mixed

Access application config

Returns

mixed

registerConfig()

registerConfig(mixed  $config) : \Pop\AbstractApplication

Register a new configuration with the application

Parameters

mixed $config

Throws

\InvalidArgumentException

Returns

\Pop\AbstractApplication

addConfigValue()

addConfigValue(string  $name, string  $value) : \Pop\AbstractApplication

Add new value to config

Parameters

string $name
string $value

Returns

\Pop\AbstractApplication

updateConfigValue()

updateConfigValue(string  $name, string  $value) : \Pop\AbstractApplication

Update existing value in config

Parameters

string $name
string $value

Returns

\Pop\AbstractApplication

deleteConfigValue()

deleteConfigValue(string  $name) : \Pop\AbstractApplication

Replace existing value in config

Parameters

string $name

Returns

\Pop\AbstractApplication

mergeConfig()

mergeConfig(mixed  $config, boolean  $preserve = false) : \Pop\AbstractApplication

Merge new or altered config values with the existing config values

Parameters

mixed $config
boolean $preserve

Throws

\Pop\Config\Exception

Returns

\Pop\AbstractApplication

__construct()

__construct() 

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

bootstrap()

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

Bootstrap the application, creating the required objects if they haven't been created yet and registering with the autoloader, adding routes, services and events

Parameters

mixed $autoloader

Throws

\Pop\Exception
\Pop\Module\Exception
\Pop\Service\Exception

Returns

\Pop\Application

init()

init() : \Pop\Application

Initialize the application

Throws

\Pop\Event\Exception
\ReflectionException

Returns

\Pop\Application

autoloader()

autoloader() : mixed

Get the autoloader object

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

registerRouter()

registerRouter(\Pop\Router\Router  $router) : \Pop\Application

Register a new router object with the application

Parameters

\Pop\Router\Router $router

Returns

\Pop\Application

registerServices()

registerServices(\Pop\Service\Locator  $services) : \Pop\Application

Register a new service locator object with the application

Parameters

\Pop\Service\Locator $services

Returns

\Pop\Application

registerEvents()

registerEvents(\Pop\Event\Manager  $events) : \Pop\Application

Register a new event manager object with the application

Parameters

\Pop\Event\Manager $events

Returns

\Pop\Application

registerModules()

registerModules(\Pop\Module\Manager  $modules) : \Pop\Application

Register a new module manager object with the application

Parameters

\Pop\Module\Manager $modules

Returns

\Pop\Application

registerAutoloader()

registerAutoloader(mixed  $autoloader) : \Pop\Application

Register the autoloader object with the application

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(mixed  $module, string  $name = null) : \Pop\Application

Register a module with the module manager object

Parameters

mixed $module
string $name

Throws

\Pop\Module\Exception
\Pop\Service\Exception

Returns

\Pop\Application

unregister()

unregister(string  $name) : \Pop\Application

Unregister a module with the module manager 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

Throws

\Pop\Service\Exception

Returns

\Pop\Application

getService()

getService(string  $name) : mixed

Get a service

Parameters

string $name

Throws

\Pop\Service\Exception

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.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.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(boolean  $exit = true, string  $forceRoute = null) : void

Run the application.

Parameters

boolean $exit
string $forceRoute

Throws

\Pop\Event\Exception
\Pop\Router\Exception
\ReflectionException

__set()

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

Set a pre-designated value in the application object

Parameters

string $name
mixed $value

Throws

\Pop\Exception

Returns

\Pop\Application

__get()

__get(string  $name) : mixed

Get a pre-designated value from the application object

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Determine if a pre-designated value in the application object exists

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : \Pop\Application

Unset a pre-designated value in the application object

Parameters

string $name

Returns

\Pop\Application

offsetSet()

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

Set a pre-designated value in the application object

Parameters

string $offset
mixed $value

Throws

\Pop\Exception

Returns

\Pop\Application

offsetGet()

offsetGet(string  $offset) : mixed

Get a pre-designated value from the application object

Parameters

string $offset

Returns

mixed

offsetExists()

offsetExists(string  $offset) : boolean

Determine if a pre-designated value in the application object exists

Parameters

string $offset

Returns

boolean

offsetUnset()

offsetUnset(string  $offset) : \Pop\Application

Unset a pre-designated value in the application object

Parameters

string $offset

Returns

\Pop\Application