PHP 클래스 Ergo\Application

상속: implements ergo\Plugin
파일 보기 프로젝트 열기: 99designs/ergo

보호된 프로퍼티들

프로퍼티 타입 설명
$_registry

공개 메소드들

메소드 설명
__call ( $method, $parameters ) * (non-phpdoc)
__construct ( $classLoader = null ) Constructor
classLoader ( ) : Router Returns the class loader associateds with the application
config ( $key ) Looks up a registry key value, requires a 'config' object to be in the registry
controller ( ) Returns an application's central controller for executing requests
dateTime ( ) : object Returns the current {@link DateTime} instance in the registry, or creates a new one
errorContext ( ) Gets the error context for the application
errorHandler ( ) : object Gets the error handler for the application
errorProxy ( ) Returns the \Ergo\Error\ErrorProxy for the application
isConsole ( ) : boolean Determines if the application is running in console mode
loggerFactory ( ) Gets the logger factory used to create loggers
loggerFor ( $class ) Looks up a logger for a class or filename from the logger factory
lookup ( $key, $closure = null ) Looks up a key in the application's core registry
middleware ( $className ) Adds a middleware to the end of the middleware stack
onStart ( ) Template method, called when the application starts
onStop ( ) Template method, called when the application stops
plug ( Ergo\Plugin $plugin ) Adds a {@link \Ergo\Plugin} to the application
plugins ( ) Returns the plugins plugged into the application
rand ( $min, $max ) : integer Returns the current random number in the registry, or generates a new one
register ( $key, $object ) A shortcut for registering an object in the registry
registry ( ) Gets the application's core registry
request ( ) Returns a request object for the current http request
requestFactory ( ) Creates or sets the logger factory used to create loggers
reset ( ) Resets all internal state
router ( ) : Router Returns a request router
run ( $server = null, $stream = null ) : void Processes an HTTP request, copies response to STDOUT
setDateTime ( $dateTime ) Sets a {@link DateTime} instance in the registry, for subsequent {@link dateTime()} and {@link time()} calls
setErrorContext ( $context )
setErrorHandler ( $errorHandler ) Sets the error handler for the application
setLoggerFactory ( Ergo\Logging\LoggerFactory $factory ) Creates or sets the logger factory used to create loggers
setRand ( $rand )
setRequestFactory ( ergo\Factory $factory ) Creates or sets the logger factory used to create loggers
start ( ) * (non-phpdoc)
stop ( ) * (non-phpdoc)
time ( ) : integer Returns the current timestamp of the instance returned by {@link dateTime()}

보호된 메소드들

메소드 설명
isStarted ( ) : boolean Returns whether this application instance has been started
mixin ( ) Returns the {@link \Ergo\Mixin} instance used for plugins

메소드 상세

__call() 공개 메소드

* (non-phpdoc)
또한 보기: http://www.php.net/manual/en/language.oop5.overloading.php
public __call ( $method, $parameters )

__construct() 공개 메소드

Constructor
public __construct ( $classLoader = null )

classLoader() 공개 메소드

Returns the class loader associateds with the application
public classLoader ( ) : Router
리턴 Router

config() 공개 메소드

Looks up a registry key value, requires a 'config' object to be in the registry
public config ( $key )

controller() 공개 메소드

Returns an application's central controller for executing requests
public controller ( )

dateTime() 공개 메소드

Returns the current {@link DateTime} instance in the registry, or creates a new one
public dateTime ( ) : object
리턴 object

errorContext() 공개 메소드

Gets the error context for the application
public errorContext ( )

errorHandler() 공개 메소드

Gets the error handler for the application
public errorHandler ( ) : object
리턴 object

errorProxy() 공개 메소드

Returns the \Ergo\Error\ErrorProxy for the application
public errorProxy ( )

isConsole() 공개 메소드

Determines if the application is running in console mode
public isConsole ( ) : boolean
리턴 boolean

isStarted() 보호된 메소드

Returns whether this application instance has been started
protected isStarted ( ) : boolean
리턴 boolean

loggerFactory() 공개 메소드

Gets the logger factory used to create loggers
public loggerFactory ( )

loggerFor() 공개 메소드

Looks up a logger for a class or filename from the logger factory
public loggerFor ( $class )

lookup() 공개 메소드

Looks up a key in the application's core registry
또한 보기: Ergo\Registry::lookup()
public lookup ( $key, $closure = null )

middleware() 공개 메소드

Adds a middleware to the end of the middleware stack
public middleware ( $className )

mixin() 보호된 메소드

Returns the {@link \Ergo\Mixin} instance used for plugins
protected mixin ( )

onStart() 공개 메소드

Template method, called when the application starts
public onStart ( )

onStop() 공개 메소드

Template method, called when the application stops
public onStop ( )

plug() 공개 메소드

Adds a {@link \Ergo\Plugin} to the application
public plug ( Ergo\Plugin $plugin )
$plugin Ergo\Plugin

plugins() 공개 메소드

Returns the plugins plugged into the application
public plugins ( )

rand() 공개 메소드

Returns the current random number in the registry, or generates a new one
public rand ( $min, $max ) : integer
리턴 integer

register() 공개 메소드

A shortcut for registering an object in the registry
public register ( $key, $object )

registry() 공개 메소드

Gets the application's core registry
public registry ( )

request() 공개 메소드

Returns a request object for the current http request
public request ( )

requestFactory() 공개 메소드

Creates or sets the logger factory used to create loggers
public requestFactory ( )

reset() 공개 메소드

Resets all internal state
public reset ( )

router() 공개 메소드

Returns a request router
public router ( ) : Router
리턴 Router

run() 공개 메소드

Processes an HTTP request, copies response to STDOUT
public run ( $server = null, $stream = null ) : void
리턴 void

setDateTime() 공개 메소드

Sets a {@link DateTime} instance in the registry, for subsequent {@link dateTime()} and {@link time()} calls
public setDateTime ( $dateTime )

setErrorContext() 공개 메소드

public setErrorContext ( $context )

setErrorHandler() 공개 메소드

Sets the error handler for the application
public setErrorHandler ( $errorHandler )

setLoggerFactory() 공개 메소드

Creates or sets the logger factory used to create loggers
public setLoggerFactory ( Ergo\Logging\LoggerFactory $factory )
$factory Ergo\Logging\LoggerFactory

setRand() 공개 메소드

public setRand ( $rand )

setRequestFactory() 공개 메소드

Creates or sets the logger factory used to create loggers
public setRequestFactory ( ergo\Factory $factory )
$factory ergo\Factory

start() 공개 메소드

* (non-phpdoc)
또한 보기: Ergo\Plugin::start()
public start ( )

stop() 공개 메소드

* (non-phpdoc)
또한 보기: Ergo\Plugin::stop()
public stop ( )

time() 공개 메소드

Returns the current timestamp of the instance returned by {@link dateTime()}
public time ( ) : integer
리턴 integer

프로퍼티 상세

$_registry 보호되어 있는 프로퍼티

protected $_registry