class LocationAwareController extends ControllerAction

Traits

Widget Maker Trait Class

Extension trait

Properties

string $configPath from  ConfigMaker
protected $configFileExtension from  ConfigMaker
array $vars from  ViewMaker
array $viewPath from  ViewMaker
array $layoutPath from  ViewMaker
array $partialPath from  ViewMaker
string $layout from  ViewMaker
bool $suppressLayout from  ViewMaker
protected $viewFileExtension from  ViewMaker
static protected array $extensionCallbacks from  ExtensionTrait
static string $extendableStaticCalledClass from  ExtensionTrait
protected $extensionHidden from  ExtensionTrait
protected Controller $controller from  ControllerAction
protected array $config from  ControllerAction
$requiredProperties
array $locationConfig

Define controller location configuration array.

protected array $requiredConfig

Methods

array
loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)

Reads the contents of the supplied file and applies it to this object.

array
makeConfig(string|array $configFile, array $requiredConfig = [])

Reads the contents of the supplied file and applies it to this object.

array
mergeConfig($configLeft, $configRight)

Merges two configuration sources, either prepared or not, and returns them as a single configuration object.

string
getConfigPath(string $fileName, mixed $configPath = null)

Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.

string
guessConfigPath(string $suffix = '')

Guess the package path for the called class.

string
guessConfigPathFrom(string $class, string $suffix = '')

Guess the package path from a specified class.

getViewPath($view, $viewPath = null)

No description

guessViewFileExtension($path)

No description

string
guessViewPath(string $suffix = '', bool $isPublic = false)

Guess the package path from a specified class.

mixed
makeLayout(string $name = null, array $vars = [], bool $throwException = true)

Render a layout.

string
makeView(string $view)

Loads a view with the name specified.

mixed
makePartial(string $partial, array $vars = [], bool $throwException = true)

Render a partial file contents located in the views or partial folder.

string
makeFileContent(string $filePath, array $extraParams = [])

Includes a file path using output buffering.

compileFileContent($filePath)

No description

void
handleViewException(Exception $e, int $obLevel)

Handle a view exception.

array
gatherViewData($data)

Get the data bound to the view instance.

makeWidget(string $class, array $widgetConfig = [])

Makes a widget object with the supplied configuration ex. model config

makeFormWidget(string $class, mixed $fieldConfig = [], array $widgetConfig = [])

Makes a form widget object with the supplied form field and widget configuration.

static void
extensionExtendCallback(callable $callback)

Helper method for ::extend() static method

extensionHideField($name)

No description

extensionHideMethod($name)

No description

extensionIsHiddenField($name)

No description

extensionIsHiddenMethod($name)

No description

static 
getCalledExtensionClass()

No description

__construct(Controller $controller)

List_Controller constructor.

setConfig(string|array $config, array $required = [])

Sets the widget configuration values

mixed
getConfig(string $name = null, mixed $default = null)

Get the widget configuration values.

hideAction($methodName)

Protects a public method from being available as an controller method.

locationApplyScope($query)

No description

locationBindEvents()

No description

Details

in ConfigMaker at line 27
array loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)

Reads the contents of the supplied file and applies it to this object.

Parameters

array $configFile
array $requiredConfig
null $index

Return Value

array

in ConfigMaker at line 46
array makeConfig(string|array $configFile, array $requiredConfig = [])

Reads the contents of the supplied file and applies it to this object.

Parameters

string|array $configFile
array $requiredConfig

Return Value

array

Exceptions

SystemException

in ConfigMaker at line 97
array mergeConfig($configLeft, $configRight)

Merges two configuration sources, either prepared or not, and returns them as a single configuration object.

Parameters

$configLeft
$configRight

Return Value

array

The config array

in ConfigMaker at line 116
string getConfigPath(string $fileName, mixed $configPath = null)

Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.

Parameters

string $fileName

File to load.

mixed $configPath

Explicitly define a config path.

Return Value

string

Full path to the config file.

in ConfigMaker at line 154
string guessConfigPath(string $suffix = '')

Guess the package path for the called class.

Parameters

string $suffix

An extra path to attach to the end

Return Value

string

in ConfigMaker at line 169
string guessConfigPathFrom(string $class, string $suffix = '')

Guess the package path from a specified class.

Parameters

string $class

Class to guess path from.

string $suffix

An extra path to attach to the end

Return Value

string

in ViewMaker at line 50
getViewPath($view, $viewPath = null)

No description

Parameters

$view
$viewPath

in ViewMaker at line 78
guessViewFileExtension($path)

No description

Parameters

$path

in ViewMaker at line 98
string guessViewPath(string $suffix = '', bool $isPublic = false)

Guess the package path from a specified class.

Parameters

string $suffix

An extra path to attach to the end

bool $isPublic

Return Value

string

in ViewMaker at line 119
mixed makeLayout(string $name = null, array $vars = [], bool $throwException = true)

Render a layout.

Parameters

string $name

Specifies the layout name. If this parameter is omitted, the $layout property will be used.

array $vars

Parameter variables to pass to the view.

bool $throwException

Throw an exception if the layout is not found

Return Value

mixed

The layout contents, or false.

Exceptions

SystemException

in ViewMaker at line 147
string makeView(string $view)

Loads a view with the name specified.

Applies layout if its name is provided by the parent object. The view file must be situated in the views directory, and has the extension "htm" or "php".

Parameters

string $view

Specifies the view name, without extension. Eg: "index".

Return Value

string

in ViewMaker at line 171
mixed makePartial(string $partial, array $vars = [], bool $throwException = true)

Render a partial file contents located in the views or partial folder.

Parameters

string $partial

The view to load.

array $vars

Parameter variables to pass to the view.

bool $throwException

Throw an exception if the partial is not found.

Return Value

mixed

Partial contents or false if not throwing an exception.

Exceptions

SystemException

in ViewMaker at line 199
string makeFileContent(string $filePath, array $extraParams = [])

Includes a file path using output buffering.

Ensures that vars are available.

Parameters

string $filePath

Absolute path to the view file.

array $extraParams

Parameters that should be available to the view.

Return Value

string

in ViewMaker at line 235
compileFileContent($filePath)

No description

Parameters

$filePath

in ViewMaker at line 256
protected void handleViewException(Exception $e, int $obLevel)

Handle a view exception.

Parameters

Exception $e
int $obLevel

Return Value

void

in ViewMaker at line 271
protected array gatherViewData($data)

Get the data bound to the view instance.

Parameters

$data

Return Value

array

in WidgetMaker at line 24
BaseWidget makeWidget(string $class, array $widgetConfig = [])

Makes a widget object with the supplied configuration ex. model config

Parameters

string $class

Widget class name

array $widgetConfig

An array of config.

Return Value

BaseWidget

The widget object

in WidgetMaker at line 47
BaseFormWidget makeFormWidget(string $class, mixed $fieldConfig = [], array $widgetConfig = [])

Makes a form widget object with the supplied form field and widget configuration.

Parameters

string $class

Widget class name

mixed $fieldConfig

A field name, an array of config or a FormField object.

array $widgetConfig

An array of config.

Return Value

BaseFormWidget

The widget object

Exceptions

Exception

in ExtensionTrait at line 32
extensionApplyInitCallbacks()

No description

in ExtensionTrait at line 51
static void extensionExtendCallback(callable $callback)

Helper method for ::extend() static method

Parameters

callable $callback

Return Value

void

in ExtensionTrait at line 64
protected extensionHideField($name)

No description

Parameters

$name

in ExtensionTrait at line 69
protected extensionHideMethod($name)

No description

Parameters

$name

in ExtensionTrait at line 74
extensionIsHiddenField($name)

No description

Parameters

$name

in ExtensionTrait at line 79
extensionIsHiddenMethod($name)

No description

Parameters

$name

in ExtensionTrait at line 84
static getCalledExtensionClass()

No description

at line 36
__construct(Controller $controller)

List_Controller constructor.

Parameters

Controller $controller

Exceptions

Exception

in ControllerAction at line 65
setConfig(string|array $config, array $required = [])

Sets the widget configuration values

Parameters

string|array $config
array $required

Required config items

in ControllerAction at line 78
mixed getConfig(string $name = null, mixed $default = null)

Get the widget configuration values.

Parameters

string $name

Config name, supports array names like "field[key]"

mixed $default

Default value if nothing is found

Return Value

mixed

in ControllerAction at line 103
protected hideAction($methodName)

Protects a public method from being available as an controller method.

Parameters

$methodName

at line 54
locationApplyScope($query)

No description

Parameters

$query

at line 67
protected locationBindEvents()

No description