com\setasign\Konquadrat\Workflow\Config\Argument

DateTimeValue Class DateTimeValue

File: /Konquadrat/src/Workflow/Config/Argument/DateTimeValue.php

Class hierarchy

Implements

Summary

Properties

$config

protected array \com\setasign\SetaFramework\Config\Config::$config

Contains the configuration

$path

$readOnly

protected bool \com\setasign\SetaFramework\Config\Config::$readOnly

Variable for the readOnly option of a Config


Static Methods

createReader()

protected static \com\setasign\SetaFramework\Config\Config::createReader (
string $file,
array $params = array ( )
): \com\setasign\SetaFramework\Config\Reader\ReaderInterface
Parameters
$file : string
 
$params : array
 

parseNode()

public static DateTimeValue::parseNode (
\DOMNode $node,
string $path
): static
Parameters
$node : \DOMNode
 
$path : string
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

parseValueNode()

public static Argument::parseValueNode (
\DOMNode $valueNode,
string $path
): static
Parameters
$valueNode : \DOMNode
 
$path : string
 

read()

public static \com\setasign\SetaFramework\Config\Config::read (
string $file,
array $params = array ( ),
bool $readOnly = false
): \com\setasign\SetaFramework\Config\Config

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

public \com\setasign\SetaFramework\Config\Config::__construct (
array|\com\setasign\SetaFramework\Config\Reader\ReaderInterface $config = array ( ),
bool $readOnly = false
)

Constructor

Parameters
$config : array|\com\setasign\SetaFramework\Config\Reader\ReaderInterface
 
$readOnly : bool
 

__clone()

public \com\setasign\SetaFramework\Config\Config::__clone (
void
): void

Implementation of __clone()

__get()

public \com\setasign\SetaFramework\Config\Config::__get (
int|string $key
): ?mixed

Magic get method to get a value

Parameters
$key : int|string
 
Exceptions

Throws \InvalidArgumentException

__isset()

public \com\setasign\SetaFramework\Config\Config::__isset (
int|string $key
): bool
Parameters
$key : int|string
 

__set()

public \com\setasign\SetaFramework\Config\Config::__set (
int|string $key,
mixed $value
): void

Magic set method to set a value

Parameters
$key : int|string
 
$value : mixed
 

__toString()

public \com\setasign\SetaFramework\Config\Config::__toString (
void
): string

toString will parse the config into json

__unset()

public \com\setasign\SetaFramework\Config\Config::__unset (
int|string $key
): void
Parameters
$key : int|string
 

count()

public \com\setasign\SetaFramework\Config\Config::count (
void
): int

Implementation of \Countable

See

delete()

public \com\setasign\SetaFramework\Config\Config::delete (
int|string $key
): void

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

public \com\setasign\SetaFramework\Config\Config::filter (
array<int|string> $allowedKeys
): \com\setasign\SetaFramework\Config\Config
Parameters
$allowedKeys : array<int|string>
 
Return Values

A new filtered config instance

get()

public \com\setasign\SetaFramework\Config\Config::get (
int|string|array $key,
mixed $default = null,
bool $chain = false
): ?mixed

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

public \com\setasign\SetaFramework\Config\Config::getChain (
int|string|array $keyChain,
mixed $default = null
): ?mixed

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.

getIdentifier()

getIterator()

public \com\setasign\SetaFramework\Config\Config::getIterator (
void
): \Traversable

getSubConfig()

public \com\setasign\SetaFramework\Config\Config::getSubConfig (
int|string|array $key,
bool $chain = false
): self
Parameters
$key : int|string|array
 
$chain : bool
 

has()

public \com\setasign\SetaFramework\Config\Config::has (
int|string $key
): bool
Parameters
$key : int|string
 

hasChain()

public \com\setasign\SetaFramework\Config\Config::hasChain (
int|string|array $keyChain
): bool

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

public \com\setasign\SetaFramework\Config\Config::in (
mixed $needle,
bool $strict = false
): bool

Searches the config for needle using loose comparison unless strict is set

Parameters
$needle : mixed
 
$strict : bool
 

isReadOnly()

public \com\setasign\SetaFramework\Config\Config::isReadOnly (
void
): bool

Checks whether this config is read-only

isSubConfig()

public \com\setasign\SetaFramework\Config\Config::isSubConfig (
int|string|array $key,
bool $chain = false
): bool
Parameters
$key : int|string|array
 
$chain : bool
 

jsonSerialize()

public \com\setasign\SetaFramework\Config\Config::jsonSerialize (
void
): array

keys()

public \com\setasign\SetaFramework\Config\Config::keys (
void
): array

Returns all keys of the config

ksort()

public \com\setasign\SetaFramework\Config\Config::ksort (
?int $sortFlags = null
): void
Parameters
$sortFlags : ?int
 

offsetExists()

public \com\setasign\SetaFramework\Config\Config::offsetExists (
mixed $offset
): bool
Parameters
$offset : mixed
 

offsetGet()

public \com\setasign\SetaFramework\Config\Config::offsetGet (
mixed $offset
): ?mixed
Parameters
$offset : mixed
 

offsetSet()

public \com\setasign\SetaFramework\Config\Config::offsetSet (
mixed $offset,
mixed $value
): void
Parameters
$offset : mixed
 
$value : mixed
 

offsetUnset()

public \com\setasign\SetaFramework\Config\Config::offsetUnset (
mixed $offset
): void
Parameters
$offset : mixed
 

process()

public DateTimeValue::process (
\com\setasign\Konquadrat\Workflow\Workflow $workflow,
?object $object = null
): \DateTime
Parameters
$workflow : \com\setasign\Konquadrat\Workflow\Workflow
 
$object : ?object
 

push()

public \com\setasign\SetaFramework\Config\Config::push (
mixed $value
): void
Parameters
$value : mixed
 

rand()

public \com\setasign\SetaFramework\Config\Config::rand (
int $numReq = 1
): array|int|string

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

public \com\setasign\SetaFramework\Config\Config::search (
mixed $needle,
bool $strict = false
): false|int|string

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

public \com\setasign\SetaFramework\Config\Config::set (
int|string $key,
mixed $value
): void

Sets a value or throws an exception if the config is marked as readOnly

Parameters
$key : int|string
 
$value : mixed
 
Exceptions

Throws \BadMethodCallException

setReadOnly()

public \com\setasign\SetaFramework\Config\Config::setReadOnly (
bool $readOnly = true
): void

Sets the read-only flag on this and all underlaying config-objects

Parameters
$readOnly : bool
 

sort()

public \com\setasign\SetaFramework\Config\Config::sort (
?int $sortFlags = null
): void
Parameters
$sortFlags : ?int
 

toArray()

public \com\setasign\SetaFramework\Config\Config::toArray (
bool $recursive = true
): array

Returns the configuration as a plain PHP array

Parameters
$recursive : bool
 

values()

public \com\setasign\SetaFramework\Config\Config::values (
void
): array

Returns all values of the config