CRM_Utils_OptionBag
in package
implements
ArrayAccess, IteratorAggregate, Countable
Class CRM_Utils_OptionBag.
Table of Contents
Interfaces
- ArrayAccess
- IteratorAggregate
- Countable
Properties
- $data : mixed
Methods
- __construct() : mixed
- count() : int
- (PHP 5 >= 5.1.0) Count elements of an object
- get() : mixed
- Retrieve a value from the bag.
- getArray() : array<string|int, mixed>
- getIterator() : Traversable
- (PHP 5 >= 5.0.0) Retrieve an external iterator
- has() : bool
- offsetExists() : bool
- (PHP 5 >= 5.0.0) Whether a offset exists
- offsetGet() : mixed
- (PHP 5 >= 5.0.0) Offset to retrieve
- offsetSet() : mixed
- (PHP 5 >= 5.0.0) Offset to set
- offsetUnset() : mixed
- (PHP 5 >= 5.0.0) Offset to unset
Properties
$data
protected
mixed
$data
Methods
__construct()
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
count()
(PHP 5 >= 5.1.0) Count elements of an object
public
count() : int
Tags
Return values
int —The custom count as an integer. The return value is cast to an integer.
get()
Retrieve a value from the bag.
public
get(string $key[, string|null $type = NULL ][, mixed $default = NULL ]) : mixed
Parameters
- $key : string
- $type : string|null = NULL
- $default : mixed = NULL
Tags
getArray()
public
getArray() : array<string|int, mixed>
Return values
array<string|int, mixed>getIterator()
(PHP 5 >= 5.0.0) Retrieve an external iterator
public
getIterator() : Traversable
Tags
Return values
Traversable —An instance of an object implementing Iterator or Traversable
has()
public
has(mixed $key) : bool
Parameters
- $key : mixed
Return values
booloffsetExists()
(PHP 5 >= 5.0.0) Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
-
An offset to check for.
Tags
Return values
bool —true on success or false on failure. The return value will be casted to boolean if non-boolean was returned.
offsetGet()
(PHP 5 >= 5.0.0) Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
The offset to retrieve.
Tags
Return values
mixed —Can return all value types.
offsetSet()
(PHP 5 >= 5.0.0) Offset to set
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
-
The offset to assign the value to.
- $value : mixed
-
The value to set.
Tags
offsetUnset()
(PHP 5 >= 5.0.0) Offset to unset
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
-
The offset to unset.