\Charcoal\ViewViewConfig

View configuration.

Summary

Methods
Properties
Constants
defaults()
setPaths()
addPath()
paths()
setEngines()
addEngine()
engines()
engine()
setDefaultEngine()
defaultEngine()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$paths
$engines
$defaultEngine
N/A

Properties

$paths

$paths : array

Type

array

$engines

$engines : array

Type

array

$defaultEngine

$defaultEngine : string

Type

string

Methods

defaults()

defaults() : array

Returns

array

setPaths()

setPaths(array  $paths) : \Charcoal\View\ViewConfig

Parameters

array $paths

The paths to search into.

Returns

\Charcoal\View\ViewConfig

Chainable

addPath()

addPath(string  $path) : \Charcoal\View\ViewConfig

Parameters

string $path

A path to add to the paths list.

Throws

\InvalidArgumentException

If the path is not a string.

Returns

\Charcoal\View\ViewConfig

Chainable

paths()

paths() : array

Returns

array

setEngines()

setEngines(array  $engines) : \Charcoal\View\ViewConfig

Parameters

array $engines

The various engines configuration.

Returns

\Charcoal\View\ViewConfig

Chainable

addEngine()

addEngine(string  $engineIdent, array  $engineConfig) : \Charcoal\View\ViewConfig

Parameters

string $engineIdent

The engine identifier.

array $engineConfig

The engine configuration data.

Throws

\InvalidArgumentException

If the engine ident is not a string.

Returns

\Charcoal\View\ViewConfig

Chainable

engines()

engines() : array

Returns

array

engine()

engine(string|null  $engineIdent = null) : array

Get an engine's configuration.

Parameters

string|null $engineIdent

The engine identifier to get the configuration of.

Throws

\InvalidArgumentException

If the engine ident is not a string or does not match any engines.

Returns

array

setDefaultEngine()

setDefaultEngine(string  $engineIdent) : \Charcoal\View\ViewConfig

Parameters

string $engineIdent

The default engine (identifier).

Throws

\InvalidArgumentException

If the engine ident is not a string.

Returns

\Charcoal\View\ViewConfig

Chainable

defaultEngine()

defaultEngine() : string

Returns

string