A file repository without files. Gets rid of useless DB queries during parser testing.
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 20 Nov 2007 10:58:12 +0000 (10:58 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 20 Nov 2007 10:58:12 +0000 (10:58 +0000)
includes/filerepo/NullRepo.php [new file with mode: 0644]

diff --git a/includes/filerepo/NullRepo.php b/includes/filerepo/NullRepo.php
new file mode 100644 (file)
index 0000000..87bfd3a
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * File repository with no files, for performance testing
+ */
+
+class NullRepo extends FileRepo {
+       function __construct( $info ) {}
+       
+       function storeBatch( $triplets, $flags = 0 ) {
+               return false;
+       }
+       
+       function storeTemp( $originalName, $srcPath ) {
+               return false;
+       }
+       function publishBatch( $triplets, $flags = 0 ) {
+               return false;
+       }
+       function deleteBatch( $sourceDestPairs ) {
+               return false;
+       }
+       function getFileProps( $virtualUrl ) {
+               return false;
+       }
+       function newFile( $title, $time = false ) {
+               return false;
+       }
+       function findFile( $title, $time = false ) {
+               return false;
+       }
+}
+
+?>