PHP Class Bluz\Application\Application

Inheritance: use trait Bluz\Common\Helper, use trait Bluz\Common\Singleton
Exibir arquivo Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$debugFlag Debug application flag
$environment Environment name
$layoutFlag Layout usage flag
$path Application path

Public Methods

Method Description
dispatch ( string $module, string $controller, array $params = [] ) : Controller Dispatch controller with params
end ( ) : void Finally method
getEnvironment ( ) : string Get application environment
getPath ( ) : string Get path to Application
getRequest ( ) : ServerRequest Get Request instance
getResponse ( ) : Response Get Response instance
init ( string $environment = 'production' ) : void Initialize process
isDebug ( ) : boolean Return Debug flag
process ( ) : void Process application
render ( ) : void Render, is send Response
run ( ) : void Run application
useLayout ( boolean | null $flag = null ) : boolean Return Layout Flag

Protected Methods

Method Description
doDispatch ( string $module, string $controller, array $params = [] ) : Controller Do dispatch
doProcess ( ) : void Do process
initConfig ( ) : void Initial Request instance
initRequest ( ) : void Initial Request instance
initResponse ( ) : void Initial Response instance
initRouter ( ) : void Initial Router instance
postDispatch ( string $module, string $controller, array $params = [] ) : void Post dispatch mount point
postProcess ( ) : void Post process
preDispatch ( string $module, string $controller, array $params = [] ) : void Pre dispatch mount point
preProcess ( ) : void Pre process

Method Details

dispatch() public method

Call dispatch from any \Bluz\Package Application::getInstance()->dispatch($module, $controller, array $params);
public dispatch ( string $module, string $controller, array $params = [] ) : Controller
$module string
$controller string
$params array
return Bluz\Controller\Controller

doDispatch() protected method

Do dispatch
protected doDispatch ( string $module, string $controller, array $params = [] ) : Controller
$module string
$controller string
$params array
return Bluz\Controller\Controller

doProcess() protected method

Do process
protected doProcess ( ) : void
return void

end() public method

Finally method
public end ( ) : void
return void

getEnvironment() public method

Get application environment
public getEnvironment ( ) : string
return string

getPath() public method

Get path to Application
public getPath ( ) : string
return string

getRequest() public method

Get Request instance
public getRequest ( ) : ServerRequest
return Zend\Diactoros\ServerRequest

getResponse() public method

Get Response instance
public getResponse ( ) : Response
return Bluz\Response\Response

init() public method

Initialize process
public init ( string $environment = 'production' ) : void
$environment string
return void

initConfig() protected method

Initial Request instance
protected initConfig ( ) : void
return void

initRequest() protected method

Initial Request instance
protected initRequest ( ) : void
return void

initResponse() protected method

Initial Response instance
protected initResponse ( ) : void
return void

initRouter() protected method

Initial Router instance
protected initRouter ( ) : void
return void

isDebug() public method

Return Debug flag
public isDebug ( ) : boolean
return boolean

postDispatch() protected method

Post dispatch mount point
protected postDispatch ( string $module, string $controller, array $params = [] ) : void
$module string
$controller string
$params array
return void

postProcess() protected method

Post process
protected postProcess ( ) : void
return void

preDispatch() protected method

Pre dispatch mount point
protected preDispatch ( string $module, string $controller, array $params = [] ) : void
$module string
$controller string
$params array
return void

preProcess() protected method

Pre process
protected preProcess ( ) : void
return void

process() public method

Note: - Why you don't use "X-" prefix for custom headers? - Because it deprecated ({@link http://tools.ietf.org/html/rfc6648})
public process ( ) : void
return void

render() public method

Render, is send Response
public render ( ) : void
return void

run() public method

Run application
public run ( ) : void
return void

useLayout() public method

Return Layout Flag
public useLayout ( boolean | null $flag = null ) : boolean
$flag boolean | null
return boolean

Property Details

$debugFlag protected_oe property

Debug application flag
protected $debugFlag

$environment protected_oe property

Environment name
protected $environment

$layoutFlag protected_oe property

Layout usage flag
protected $layoutFlag

$path protected_oe property

Application path
protected $path