Documentation

RequestResponseHandler
in package
Uses CanRetrieveModel, CanRetrieveBooterSettings

Base class for the response and request objects

Table of Contents

$booter  : ZubZet
__construct()  : mixed
getBooterSettings()  : mixed
Gets a booter setting
getModel()  : Model
Returns a model, one shared instance per request; falls back to the framework models when not found
getZRoot()  : string
Returns the framework root directory
getZViews()  : string
Returns the project's own views directory (config z_views, relative path with trailing slash), not the framework's IncludedComponents views

Properties

Methods

getBooterSettings()

Gets a booter setting

public getBooterSettings([string|null $key = null ][, bool $useDefault = true ][, mixed $default = null ]) : mixed
Parameters
$key : string|null = null

Key of the setting, null or empty returns all settings

$useDefault : bool = true

Return $default instead of throwing when the key does not exist

$default : mixed = null

Value returned for a missing key when $useDefault is true

Tags
throws
InvalidArgumentException

If the key does not exist and $useDefault is false

Return values
mixed —

Value of the key

getModel()

Returns a model, one shared instance per request; falls back to the framework models when not found

public getModel(string $model[, string|null $dir = null ]) : Model
Parameters
$model : string

Name of the model, sub-folders dot separated (e.g. "admin.User")

$dir : string|null = null

Set this when the model is stored in a specific directory, needs a trailing slash

Tags
throws
Exception

When the model does not exist

Return values
Model —

The model

getZRoot()

Returns the framework root directory

public getZRoot() : string
Return values
string —

getZViews()

Returns the project's own views directory (config z_views, relative path with trailing slash), not the framework's IncludedComponents views

public getZViews() : string
Return values
string —

Search results