PHP Class Pop\Project\Project

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$config Pop\Config Project config
$events Pop\Event\Manager Project events
$logger Pop\Log\Logger Project logger
$modules array Project module configs
$router Pop\Mvc\Router Project router
$services Pop\Service\Locator Project services
$start integer Project start timestamp

Méthodes publiques

Méthode Description
__construct ( mixed $config = null, array $module = null, Router $router = null ) : Project Constructor
attachEvent ( string $name, mixed $action, integer $priority ) : Project Attach an event. Default project event name hook-points are:
config ( ) : Config Access the project config
database ( string $dbname ) : Db Access a project database
detachEvent ( string $name, mixed $action ) : Project Detach an event. Default project event name hook-points are:
factory ( mixed $config = null, array $module = null, Router $router = null ) : Project Static method to instantiate the project object and return itself to facilitate chaining methods together.
getEventManager ( ) : Manager Get the event Manager
getService ( string $name ) : mixed Get a service
getServiceLocator ( ) : Locator Get the service Locator
isLoaded ( string $name ) : boolean Determine whether a module is loaded
loadConfig ( mixed $config ) : Project Load a project config
loadModule ( array $module ) : Project Load a module config
loadRouter ( Router $router ) : Project Load a router
log ( string $message, integer $time = null, integer $priority = Pop\Log\Logger::INFO ) : void Log the project.
logger ( ) : Logger Access the project logger
module ( string $name ) : Config Access a project module config
modules ( ) : array Access all project module configs
router ( ) : Router Access the project router
run ( ) : void Run the project.
setService ( string $name, mixed $call, mixed $params = null ) : Project Set a service

Method Details

__construct() public méthode

Instantiate a project object
public __construct ( mixed $config = null, array $module = null, Router $router = null ) : Project
$config mixed
$module array
$router Pop\Mvc\Router
Résultat Project

attachEvent() public méthode

route.pre route route.error route.post dispatch.pre dispatch dispatch.send dispatch.post dispatch.error
public attachEvent ( string $name, mixed $action, integer $priority ) : Project
$name string
$action mixed
$priority integer
Résultat Project

config() public méthode

Access the project config
public config ( ) : Config
Résultat Pop\Config

database() public méthode

Access a project database
public database ( string $dbname ) : Db
$dbname string
Résultat Pop\Db\Db

detachEvent() public méthode

route.pre route route.error route.post dispatch.pre dispatch dispatch.send dispatch.post dispatch.error
public detachEvent ( string $name, mixed $action ) : Project
$name string
$action mixed
Résultat Project

factory() public static méthode

Static method to instantiate the project object and return itself to facilitate chaining methods together.
public static factory ( mixed $config = null, array $module = null, Router $router = null ) : Project
$config mixed
$module array
$router Pop\Mvc\Router
Résultat Project

getEventManager() public méthode

Get the event Manager
public getEventManager ( ) : Manager
Résultat Pop\Event\Manager

getService() public méthode

Get a service
public getService ( string $name ) : mixed
$name string
Résultat mixed

getServiceLocator() public méthode

Get the service Locator
public getServiceLocator ( ) : Locator
Résultat Pop\Service\Locator

isLoaded() public méthode

Determine whether a module is loaded
public isLoaded ( string $name ) : boolean
$name string
Résultat boolean

loadConfig() public méthode

Load a project config
public loadConfig ( mixed $config ) : Project
$config mixed
Résultat Project

loadModule() public méthode

Load a module config
public loadModule ( array $module ) : Project
$module array
Résultat Project

loadRouter() public méthode

Load a router
public loadRouter ( Router $router ) : Project
$router Pop\Mvc\Router
Résultat Project

log() public méthode

Log the project.
public log ( string $message, integer $time = null, integer $priority = Pop\Log\Logger::INFO ) : void
$message string
$time integer
$priority integer
Résultat void

logger() public méthode

Access the project logger
public logger ( ) : Logger
Résultat Pop\Log\Logger

module() public méthode

Access a project module config
public module ( string $name ) : Config
$name string
Résultat Pop\Config

modules() public méthode

Access all project module configs
public modules ( ) : array
Résultat array

router() public méthode

Access the project router
public router ( ) : Router
Résultat Pop\Mvc\Router

run() public méthode

Run the project.
public run ( ) : void
Résultat void

setService() public méthode

Set a service
public setService ( string $name, mixed $call, mixed $params = null ) : Project
$name string
$call mixed
$params mixed
Résultat Project

Property Details

$config protected_oe property

Project config
protected Config,Pop $config
Résultat Pop\Config

$events protected_oe property

Project events
protected Manager,Pop\Event $events
Résultat Pop\Event\Manager

$logger protected_oe property

Project logger
protected Logger,Pop\Log $logger
Résultat Pop\Log\Logger

$modules protected_oe property

Project module configs
protected array $modules
Résultat array

$router protected_oe property

Project router
protected Router,Pop\Mvc $router
Résultat Pop\Mvc\Router

$services protected_oe property

Project services
protected Locator,Pop\Service $services
Résultat Pop\Service\Locator

$start protected_oe property

Project start timestamp
protected int $start
Résultat integer