summaryrefslogtreecommitdiff
path: root/www/wiki/includes/libs/filebackend/filejournal/NullFileJournal.php
blob: 8d472abf2ce3a34f7b4fb9c97c25055fb3dab19c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
 * Simple version of FileJournal that does nothing
 * @since 1.20
 */
class NullFileJournal extends FileJournal {
	/**
	 * @see FileJournal::doLogChangeBatch()
	 * @param array $entries
	 * @param string $batchId
	 * @return StatusValue
	 */
	protected function doLogChangeBatch( array $entries, $batchId ) {
		return StatusValue::newGood();
	}

	/**
	 * @see FileJournal::doGetCurrentPosition()
	 * @return int|bool
	 */
	protected function doGetCurrentPosition() {
		return false;
	}

	/**
	 * @see FileJournal::doGetPositionAtTime()
	 * @param int|string $time Timestamp
	 * @return int|bool
	 */
	protected function doGetPositionAtTime( $time ) {
		return false;
	}

	/**
	 * @see FileJournal::doGetChangeEntries()
	 * @param int $start
	 * @param int $limit
	 * @return array
	 */
	protected function doGetChangeEntries( $start, $limit ) {
		return [];
	}

	/**
	 * @see FileJournal::doPurgeOldLogs()
	 * @return StatusValue
	 */
	protected function doPurgeOldLogs() {
		return StatusValue::newGood();
	}
}