class CRM_Utils_OptionBag implements ArrayAccess, IteratorAggregate, Countable

Class CRM_Utils_OptionBag.

Properties

protected $data

Methods

__construct(array $data = array())

No description

array
getArray()

No description

mixed
get(string $key, string|null $type = NULL, mixed $default = NULL)

Retrieve a value from the bag.

bool
has($key)

No description

bool
offsetExists(mixed $offset)

(PHP 5 >= 5.0.0) Whether a offset exists

mixed
offsetGet(mixed $offset)

(PHP 5 >= 5.0.0) Offset to retrieve

offsetSet(mixed $offset, mixed $value)

(PHP 5 >= 5.0.0) Offset to set

offsetUnset(mixed $offset)

(PHP 5 >= 5.0.0) Offset to unset

getIterator()

(PHP 5 >= 5.0.0) Retrieve an external iterator

int
count()

(PHP 5 >= 5.1.0) Count elements of an object

Details

at line 43
__construct(array $data = array())

Parameters

array $data

at line 50
array getArray()

Return Value

array

at line 63
mixed get(string $key, string|null $type = NULL, mixed $default = NULL)

Retrieve a value from the bag.

Parameters

string $key
string|null $type
mixed $default

Return Value

mixed

Exceptions

API_Exception

at line 84
bool has($key)

Parameters

$key

Return Value

bool

at line 100
bool offsetExists(mixed $offset)

(PHP 5 >= 5.0.0) Whether a offset exists

Parameters

mixed $offset An offset to check for.

Return Value

bool true on success or false on failure. The return value will be casted to boolean if non-boolean was returned.

at line 115
mixed offsetGet(mixed $offset)

(PHP 5 >= 5.0.0) Offset to retrieve

Parameters

mixed $offset The offset to retrieve.

Return Value

mixed Can return all value types.

at line 130
offsetSet(mixed $offset, mixed $value)

(PHP 5 >= 5.0.0) Offset to set

Parameters

mixed $offset The offset to assign the value to.
mixed $value The value to set.

at line 142
offsetUnset(mixed $offset)

(PHP 5 >= 5.0.0) Offset to unset

Parameters

mixed $offset The offset to unset.

at line 155
Traversable getIterator()

(PHP 5 >= 5.0.0) Retrieve an external iterator

Return Value

Traversable An instance of an object implementing Iterator or Traversable

at line 168
int count()

(PHP 5 >= 5.1.0) Count elements of an object

Return Value

int The custom count as an integer. The return value is cast to an integer.