Documentation

View extends View
in package

View configuration

Table of Contents

$filters  : array<string|int, 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  : array<string|int, 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. 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.
$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
Will attempt to get environment variables with names that match the properties of the child class.
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 array<string|int, mixed> $filters = []

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) }

$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 array<string|int, 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. 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.

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()

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

public __construct() : mixed

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

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