2016-02-01 20:44:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Session;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dummy session backend
|
|
|
|
|
*
|
|
|
|
|
* This isn't a real backend, but implements some methods that SessionBackend
|
|
|
|
|
* does so tests can run.
|
|
|
|
|
*/
|
|
|
|
|
class DummySessionBackend {
|
2016-02-17 09:09:32 +00:00
|
|
|
public $data = [
|
2016-02-01 20:44:03 +00:00
|
|
|
'foo' => 1,
|
|
|
|
|
'bar' => 2,
|
|
|
|
|
0 => 'zero',
|
2016-02-17 09:09:32 +00:00
|
|
|
];
|
2016-02-01 20:44:03 +00:00
|
|
|
public $dirty = false;
|
|
|
|
|
|
|
|
|
|
public function &getData() {
|
|
|
|
|
return $this->data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function dirty() {
|
|
|
|
|
$this->dirty = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function deregisterSession( $index ) {
|
|
|
|
|
}
|
|
|
|
|
}
|