\ConfigView

View configuration

Not intended to be used on its own, this class will attempt to automatically populate the child class' properties with values from the environment.

These can be set within the .env file.

Summary

Methods
Properties
Constants
__construct()
$registrars
$saveData
$filters
$plugins
No constants found
initEnvValue()
getEnvValue()
registerProperties()
$coreFilters
$corePlugins
$didDiscovery
$moduleConfig
N/A
No private methods found
No private properties found
N/A

Properties

$registrars

$registrars : array

An optional array of classes that will act as Registrars for rapidly setting config class properties.

Type

array

$saveData

$saveData : 

When false, the view method will clear the data between each call. This keeps your data safe and ensures there is no accidental leaking between calls, so you would need to explicitly pass the data to each view. You might prefer to have the data stick around between calls so that it is available to all views. If that is the case, set $saveData to true.

Type

$filters

$filters : 

Parser Filters map a filter name with any PHP callable. When the Parser prepares a variable for display, it will chain it through the filters in the order defined, inserting any parameters.

To prevent potential abuse, all filters MUST be defined here in order for them to be available for use within the Parser.

Examples: { title|esc(js) } { created_on|date(Y-m-d)|esc(attr) }

Type

$plugins

$plugins : 

Parser Plugins provide a way to extend the functionality provided by the core Parser by creating aliases that will be replaced with any callable. Can be single or tag pair.

Type

$coreFilters

$coreFilters : \CodeIgniter\Config\type

Built-in View filters.

Type

\CodeIgniter\Config\type

$corePlugins

$corePlugins : \CodeIgniter\Config\type

Built-in View plugins.

Type

\CodeIgniter\Config\type

$didDiscovery

$didDiscovery : boolean

Has module discovery happened yet?

Type

boolean

$moduleConfig

$moduleConfig : \CodeIgniter\Config\type

The modules configuration.

Type

\CodeIgniter\Config\type

Methods

__construct()

__construct() 

Will attempt to get environment variables with names that match the properties of the child class.

The "shortPrefix" is the lowercase-only config class name.

initEnvValue()

initEnvValue(  $property, string  $name, string  $prefix, string  $shortPrefix) : mixed

Initialization an environment-specific configuration setting

Parameters

$property
string $name
string $prefix
string $shortPrefix

Returns

mixed

getEnvValue()

getEnvValue(string  $property, string  $prefix, string  $shortPrefix) : mixed

Retrieve an environment-specific configuration setting

Parameters

string $property
string $prefix
string $shortPrefix

Returns

mixed

registerProperties()

registerProperties() 

Provides external libraries a simple way to register one or more options into a config file.

Throws

\ReflectionException