package |
Default |
inherited_from |
\Zend\Config\Processor\Token |
Methods
Constant Processor walks through a Config structure and replaces all
PHP constants with their respective values
__construct(boolean $userOnly = true
, string $prefix = ''
, string $suffix = ''
) : \Zend\Config\Processor\Constant
Parameters
$userOnly
boolean
True to process only user-defined constants, false to process all PHP constants
$prefix
string
Optional prefix
$suffix
string
Optional suffix
Returns
\Zend\Config\Processor\Constant
Add new token.
addToken(string $token, mixed $value) : \Zend\Config\Processor\Token
Inherited
Parameters
$token
string
$value
mixed
Exceptions
\Zend\Config\Exception\InvalidArgumentException |
|
Returns
\Zend\Config\Processor\Token
getPrefix()
getPrefix() : string
Inherited
getSuffix()
getSuffix() : string
Inherited
Get current token registry.
getTokens() : array
inherited_from |
\Zend\Config\Processor\Token::getTokens() |
Returns
array
Get current token registry.
getTokens() : array
Inherited
getUserOnly()
getUserOnly() : boolean
Load all currently defined constants into parser.
loadConstants() : void
Process
process(\Zend\Config\Config $config) : \Zend\Config\Config
Inherited
inherited_from |
\Zend\Config\Processor\ProcessorInterface::process() |
Parameters
$config
\Zend\Config\Config
Exceptions
\Zend\Config\Exception\InvalidArgumentException |
|
Returns
\Zend\Config\Config
Process a single value
processValue(mixed $value) : mixed
Inherited
inherited_from |
\Zend\Config\Processor\ProcessorInterface::processValue() |
Parameters
$value
Returns
mixed
setPrefix()
setPrefix(string $prefix) : \Zend\Config\Processor\Token
Inherited
Parameters
$prefix
string
Returns
\Zend\Config\Processor\Token
setSuffix()
setSuffix(string $suffix) : \Zend\Config\Processor\Token
Inherited
Parameters
$suffix
string
Returns
\Zend\Config\Processor\Token
Add new token.
setToken(string $token, mixed $value) : \Zend\Config\Processor\Token
Inherited
Parameters
$token
string
$value
mixed
Returns
\Zend\Config\Processor\Token
Set token registry.
setTokens(array|\Zend\Config\Config|\Traversable $tokens) : \Zend\Config\Processor\Token
Inherited
Parameters
$tokens
array
\Zend\Config\Config
\Traversable
Associative array of TOKEN => value
to replace it with
Exceptions
\Zend\Config\Exception\InvalidArgumentException |
|
Returns
\Zend\Config\Processor\Token
Should we use only user-defined constants?
setUserOnly(boolean $userOnly) : \Zend\Config\Processor\Constant
Parameters
$userOnly
boolean
Returns
\Zend\Config\Processor\Constant
Build replacement map
buildMap() : array
Inherited
Applies replacement map to the given value by modifying the value itself
doProcess(mixed $value, array $replacements) : mixed
Inherited
Parameters
$value
mixed
$replacements
array
Exceptions
\Zend\Config\Exception\InvalidArgumentException |
if the provided value is a read-only {@see Config} |
Returns
mixed
Properties
Replacement map
$map : array
Token prefix.
$prefix : string
Token suffix.
$suffix : string
The registry of tokens
$tokens : array
Replace only user-defined tokens
$userOnly : boolean