commit | d49d96232f045311dc1f21bf0d7e40adf82a1f1d | [log] [tgz] |
---|---|---|
author | Ori Livneh <ori@wikimedia.org> | Sun May 29 00:39:26 2016 -0700 |
committer | Ori Livneh <ori@wikimedia.org> | Sun May 29 00:39:26 2016 -0700 |
tree | b1dbc846cf9109acb4bd2591eecd1316fcdb539b | |
parent | de73728295f8452465dbb5ec2b680427d557e61b [diff] |
stop using wikimedia/assert In XHProf profiles of Wikimedia edit requests, Wikimedia\Assert\Assert::hasType has ranks somewhere between second and fourth place when sorting function calls by exclusive CPU time. Replace it with a simple is_array() check and stop verifying the type of each of the array's values. Change-Id: I5a7a9f25912f4f1d8d2c274237999718bc8e68dd
CDB, short for "constant database", refers to a very fast and highly reliable database system which uses a simple file with key value pairs. This library wraps the CDB functionality exposed in PHP via the dba_*
functions. In cases where dba_*
functions are not present or are not compiled with CDB support, a pure-PHP implementation is provided for falling back.
Additional documentation about the library can be found on MediaWiki.org.
// Reading a CDB file $cdb = \Cdb\Reader::open( 'db.cdb' ); $foo = $cdb->get( 'somekey' ); // Writing to a CDB file $cdb = \Cdb\Writer::open( 'anotherdb.cdb' ); $cdb->set( 'somekey', $foo );
composer install --prefer-dist composer test
This library was first introduced in MediaWiki 1.16 (r52203). It was split out of the MediaWiki codebase and published as an independent library during the MediaWiki 1.25 development cycle.