com\setasign\Konquadrat\Workflow\Config\Condition
TrueStatement Class TrueStatement
File: /Konquadrat/src/Workflow/Config/Condition/TrueStatement.php
Class hierarchy
- com\setasign\SetaFramework\Config\Config
Implements
- \ArrayAccess
- \Countable
- \IteratorAggregate
- \JsonSerializable
- \Stringable
- \Traversable
- \com\setasign\Konquadrat\Workflow\Config\HasIdentifierInterface
Summary
Methods
- __construct()
- __clone()
- __get()
- __isset()
- __set()
- __toString()
- __unset()
- count()
- delete()
- filter()
- get()
- getChain()
- getIdentifier()
- getIterator()
- getSubConfig()
- has()
- hasChain()
- in()
- isReadOnly()
- isSubConfig()
- jsonSerialize()
- keys()
- ksort()
- offsetExists()
- offsetGet()
- offsetSet()
- offsetUnset()
- process()
- push()
- rand()
- search()
- set()
- setReadOnly()
- sort()
- toArray()
- values()
Properties
$config
-
Contains the configuration
$path
$readOnly
-
Variable for the readOnly option of a Config
Static Methods
createReader()
-
array $params = array ( )
Parameters
- $file : string
- $params : array
parseNode()
parseValueNode()
Parameters
- $valueNode : \DOMNode
- $path : string
read()
-
array $params = array ( ),
bool $readOnly = false
Reads a config file.
Which $params are possible depends on $file. The params will be passed in the given order. Only the internal order will be used, not the keys.
Supported file types: .ini, .xml, .json, .php
Parameters
- $file : string
- $params : array
- $readOnly : bool
Return Values
Result depends on $createConfig; If false $readOnly won't be used.
Methods
__construct()
-
bool $readOnly = false
Constructor
Parameters
- $config : array|\com\setasign\SetaFramework\Config\Reader\ReaderInterface
- $readOnly : bool
__clone()
-
Implementation of __clone()
__get()
-
Magic get method to get a value
Parameters
- $key : int|string
Exceptions
Throws \InvalidArgumentException
__isset()
-
Parameters
- $key : int|string
__set()
-
mixed $value
Magic set method to set a value
Parameters
- $key : int|string
- $value : mixed
__toString()
-
toString will parse the config into json
__unset()
-
Parameters
- $key : int|string
count()
-
Implementation of \Countable
See
delete()
-
Deletes an entry or throws an exception if the config is marked as readOnly or the entry does not exist
Parameters
- $key : int|string
Exceptions
Throws \InvalidArgumentException
Throws \BadMethodCallException
filter()
-
Parameters
- $allowedKeys : array<int|string>
Return Values
A new filtered config instance
get()
-
mixed $default = null,
bool $chain = false
Method to get an entry of the config. If the entry is not found, the default-value is returned.
Parameters
- $key : int|string|array
- $default : mixed
- $chain : bool
getChain()
-
mixed $default = null
Helper method to get a value or the default of a nested config.
If the keyChain does not exist like specified the default will be returned.
$keyChain can be defined as string: '->' is the delimiter of the keys.
Parameters
- $keyChain : int|string|array
- $default : mixed
The default value.
getSubConfig()
-
bool $chain = false
Parameters
- $key : int|string|array
- $chain : bool
has()
-
Parameters
- $key : int|string
hasChain()
-
Helper method to check if a chain exists in a nested config.
$keyChain can be defined as string: '->' is the delimiter of the keys.
Parameters
- $keyChain : int|string|array
in()
-
bool $strict = false
Searches the config for needle using loose comparison unless strict is set
Parameters
- $needle : mixed
- $strict : bool
isReadOnly()
-
Checks whether this config is read-only
isSubConfig()
-
bool $chain = false
Parameters
- $key : int|string|array
- $chain : bool
keys()
-
Returns all keys of the config
ksort()
-
Parameters
- $sortFlags : ?int
offsetExists()
-
Parameters
- $offset : mixed
offsetGet()
-
Parameters
- $offset : mixed
offsetSet()
-
mixed $value
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
-
Parameters
- $offset : mixed
process()
Parameters
- $workflow : \com\setasign\Konquadrat\Workflow\Workflow
- $object : ?object
push()
-
Parameters
- $value : mixed
rand()
-
Picks one or more random entries out of an array, and returns the key (or keys) of the random entries.
Parameters
- $numReq : int
Specifies how many entries should be picked.
Return Values
When picking only one entry, array_rand() returns the key for a random entry. Otherwise, an array of keys for the random entries is returned. This is done so that random keys can be picked from the array as well as random values. Trying to pick more elements than there are in the array will result in an E_WARNING level error, and NULL will be returned.
search()
-
bool $strict = false
Searches the array for a given value and returns the corresponding key if successful
Parameters
- $needle : mixed
The searched value.
- $strict : bool
If TRUE then the method will search for identical elements in the haystack. This means it will also check the types of the needle in the haystack, and objects must be the same instance.
set()
-
mixed $value
Sets a value or throws an exception if the config is marked as readOnly
Parameters
- $key : int|string
- $value : mixed
Exceptions
Throws \BadMethodCallException
setReadOnly()
-
Sets the read-only flag on this and all underlaying config-objects
Parameters
- $readOnly : bool
sort()
-
Parameters
- $sortFlags : ?int
toArray()
-
Returns the configuration as a plain PHP array
Parameters
- $recursive : bool
values()
-
Returns all values of the config
