Documentation

View extends BaseConfig
in package

View configuration

Table of Contents

$filters  : mixed
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.
$plugins  : mixed
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.
$registrars  : array<string|int, mixed>
An optional array of classes that will act as Registrars for rapidly setting config class properties.
$saveData  : bool
When false, the view method will clear the data between each call.
$coreFilters  : array<string|int, mixed>
Built-in View filters.
$corePlugins  : array<string|int, mixed>
Built-in View plugins.
$didDiscovery  : bool
Has module discovery happened yet?
$moduleConfig  : Modules
The modules configuration.
__construct()  : mixed
Constructor.
getEnvValue()  : mixed
Retrieve an environment-specific configuration setting
initEnvValue()  : mixed
Initialization an environment-specific configuration setting
registerProperties()  : mixed
Provides external libraries a simple way to register one or more options into a config file.

Properties

$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.

public mixed $filters = []

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

$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.

public mixed $plugins = []

$registrars

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

public static array<string|int, mixed> $registrars = []

$saveData

When false, the view method will clear the data between each call.

public bool $saveData = true

$coreFilters

Built-in View filters.

protected array<string|int, mixed> $coreFilters = ['abs' => '\abs', 'capitalize' => '\CodeIgniter\View\Filters::capitalize', 'date' => '\CodeIgniter\View\Filters::date', 'date_modify' => '\CodeIgniter\View\Filters::date_modify', 'default' => '\CodeIgniter\View\Filters::default', 'esc' => '\CodeIgniter\View\Filters::esc', 'excerpt' => '\CodeIgniter\View\Filters::excerpt', 'highlight' => '\CodeIgniter\View\Filters::highlight', 'highlight_code' => '\CodeIgniter\View\Filters::highlight_code', 'limit_words' => '\CodeIgniter\View\Filters::limit_words', 'limit_chars' => '\CodeIgniter\View\Filters::limit_chars', 'local_currency' => '\CodeIgniter\View\Filters::local_currency', 'local_number' => '\CodeIgniter\View\Filters::local_number', 'lower' => '\strtolower', 'nl2br' => '\CodeIgniter\View\Filters::nl2br', 'number_format' => '\number_format', 'prose' => '\CodeIgniter\View\Filters::prose', 'round' => '\CodeIgniter\View\Filters::round', 'strip_tags' => '\strip_tags', 'title' => '\CodeIgniter\View\Filters::title', 'upper' => '\strtoupper']

$corePlugins

Built-in View plugins.

protected array<string|int, mixed> $corePlugins = ['current_url' => '\CodeIgniter\View\Plugins::currentURL', 'previous_url' => '\CodeIgniter\View\Plugins::previousURL', 'mailto' => '\CodeIgniter\View\Plugins::mailto', 'safe_mailto' => '\CodeIgniter\View\Plugins::safeMailto', 'lang' => '\CodeIgniter\View\Plugins::lang', 'validation_errors' => '\CodeIgniter\View\Plugins::validationErrors', 'route' => '\CodeIgniter\View\Plugins::route', 'siteURL' => '\CodeIgniter\View\Plugins::siteURL']

$didDiscovery

Has module discovery happened yet?

protected static bool $didDiscovery = false

Methods

__construct()

Constructor.

public __construct() : mixed

Merge the built-in and developer-configured filters and plugins, with preference to the developer ones.

Return values
mixed

getEnvValue()

Retrieve an environment-specific configuration setting

protected getEnvValue(string $property, string $prefix, string $shortPrefix) : mixed
Parameters
$property : string
$prefix : string
$shortPrefix : string
Return values
mixed

initEnvValue()

Initialization an environment-specific configuration setting

protected initEnvValue(mixed &$property, string $name, string $prefix, string $shortPrefix) : mixed
Parameters
$property : mixed
$name : string
$prefix : string
$shortPrefix : string
Return values
mixed

registerProperties()

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

protected registerProperties() : mixed
Tags
throws
ReflectionException
Return values
mixed

Search results