Auth_OpenID_Mapping
in package
An Auth_OpenID_Mapping maintains a mapping from arbitrary keys to arbitrary values. (This is unlike an ordinary PHP array, whose keys may be only simple scalars.)
Table of Contents
- $keys : mixed
- $values : mixed
- __construct() : mixed
- Initialize a mapping. If $classic_array is specified, its keys and values are used to populate the mapping.
- _reflow() : mixed
- contains() : bool
- Returns true if the specified value has a key in the mapping; false if not.
- del() : bool
- Deletes a key-value pair from the mapping with the specified key.
- get() : mixed|null
- Gets a specified value from the mapping, associated with the specified key. If the key does not exist in the mapping, $default is returned instead.
- isA() : bool
- Returns true if $thing is an Auth_OpenID_Mapping object; false if not.
- items() : mixed
- Returns an array of (key, value) pairs in the mapping.
- keys() : mixed
- Returns an array of the keys in the mapping.
- len() : mixed
- Returns the "length" of the mapping, or the number of keys.
- set() : mixed
- Sets a key-value pair in the mapping. If the key already exists, its value is replaced with the new value.
- values() : mixed
- Returns an array of values in the mapping.
Properties
$keys
private
mixed
$keys
= []
$values
private
mixed
$values
= []
Methods
__construct()
Initialize a mapping. If $classic_array is specified, its keys and values are used to populate the mapping.
public
__construct([array<string|int, mixed>|null $classic_array = null ]) : mixed
Parameters
- $classic_array : array<string|int, mixed>|null = null
Return values
mixed —_reflow()
public
_reflow() : mixed
Tags
Return values
mixed —contains()
Returns true if the specified value has a key in the mapping; false if not.
public
contains(string|array<string|int, mixed> $key) : bool
Parameters
- $key : string|array<string|int, mixed>
Return values
bool —del()
Deletes a key-value pair from the mapping with the specified key.
public
del(string|array<string|int, mixed> $key) : bool
Parameters
- $key : string|array<string|int, mixed>
Return values
bool —get()
Gets a specified value from the mapping, associated with the specified key. If the key does not exist in the mapping, $default is returned instead.
public
get(string|array<string|int, mixed> $key[, mixed $default = null ]) : mixed|null
Parameters
- $key : string|array<string|int, mixed>
- $default : mixed = null
Return values
mixed|null —isA()
Returns true if $thing is an Auth_OpenID_Mapping object; false if not.
public
static isA(Auth_OpenID_Mapping $thing) : bool
Parameters
- $thing : Auth_OpenID_Mapping
Return values
bool —items()
Returns an array of (key, value) pairs in the mapping.
public
items() : mixed
Return values
mixed —keys()
Returns an array of the keys in the mapping.
public
keys() : mixed
Return values
mixed —len()
Returns the "length" of the mapping, or the number of keys.
public
len() : mixed
Return values
mixed —set()
Sets a key-value pair in the mapping. If the key already exists, its value is replaced with the new value.
public
set(string|array<string|int, mixed> $key, mixed $value) : mixed
Parameters
- $key : string|array<string|int, mixed>
- $value : mixed
Return values
mixed —values()
Returns an array of values in the mapping.
public
values() : mixed