wikimedia/cdb
CDB functions for PHP
|
Hash implements the CdbReader interface based on an associative PHP array (a.k.a "hash"). More...
Public Member Functions | |
__construct (array $data) | |
Create the object and open the file. | |
close () | |
Close the file. | |
get ( $key) | |
Get a value with a given key. | |
exists ( $key) | |
Check whether key exists. | |
firstkey () | |
Fetch first key. | |
nextkey () | |
Fetch next key. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Cdb\Reader | |
static | open ( $fileName) |
Open a file and return a subclass instance. | |
static | haveExtension () |
Returns true if the native extension is available. | |
Hash implements the CdbReader interface based on an associative PHP array (a.k.a "hash").
Cdb\Reader\Hash::__construct | ( | array | $data | ) |
Create the object and open the file.
string[] | $data | An associative array |
Cdb\Reader\Hash::close | ( | ) |
Close the file.
Optional, you can just let the variable go out of scope.
Reimplemented from Cdb\Reader.
Cdb\Reader\Hash::exists | ( | $key | ) |
Cdb\Reader\Hash::firstkey | ( | ) |
Cdb\Reader\Hash::get | ( | $key | ) |
Get a value with a given key.
Only string values are supported.
string | int | $key |
Reimplemented from Cdb\Reader.
Cdb\Reader\Hash::nextkey | ( | ) |