class DBABagOStuff extends BagOStuff {
var $mHandler, $mFile, $mReader, $mWriter, $mDisabled;
+ /**
+ * @param $params array
+ */
public function __construct( $params ) {
global $wgDBAhandler;
}
/**
+ * @param $blob string
* @return array list containing value first and expiry second
*/
function decode( $blob ) {
}
}
+ /**
+ * @return resource
+ */
function getReader() {
if ( file_exists( $this->mFile ) ) {
$handle = dba_open( $this->mFile, 'rl', $this->mHandler );
return $handle;
}
+ /**
+ * @return resource
+ */
function getWriter() {
$handle = dba_open( $this->mFile, 'cl', $this->mHandler );
return $handle;
}
+ /**
+ * @param $key string
+ * @return mixed|null|string
+ */
function get( $key ) {
wfProfileIn( __METHOD__ );
wfDebug( __METHOD__ . "($key)\n" );
return $val;
}
+ /**
+ * @param $key string
+ * @param $value mixed
+ * @param $exptime int
+ * @return bool
+ */
function set( $key, $value, $exptime = 0 ) {
wfProfileIn( __METHOD__ );
wfDebug( __METHOD__ . "($key)\n" );
return $ret;
}
+ /**
+ * @param $key string
+ * @param $time int
+ * @return bool
+ */
function delete( $key, $time = 0 ) {
wfProfileIn( __METHOD__ );
wfDebug( __METHOD__ . "($key)\n" );
return $ret;
}
+ /**
+ * @param $key string
+ * @param $value mixed
+ * @param $exptime int
+ * @return bool
+ */
function add( $key, $value, $exptime = 0 ) {
wfProfileIn( __METHOD__ );
return $ret;
}
+ /**
+ * @return Array
+ */
function keys() {
$reader = $this->getReader();
$k1 = dba_firstkey( $reader );