3 * Generic operation result for FileRepo-related operations
10 * Generic operation result class for FileRepo-related operations
13 class FileRepoStatus
extends Status
{
15 * Factory function for fatal errors
17 * @param $repo FileRepo
19 * @return FileRepoStatus
21 static function newFatal( $repo /*, parameters...*/ ) {
22 $params = array_slice( func_get_args(), 1 );
23 $result = new self( $repo );
24 call_user_func_array( array( &$result, 'error' ), $params );
30 * @param $repo FileRepo
32 * @return FileRepoStatus
34 static function newGood( $repo = false, $value = null ) {
35 $result = new self( $repo );
36 $result->value
= $value;
41 * @param $repo FileRepo
43 function __construct( $repo = false ) {
45 $this->cleanCallback
= $repo->getErrorCleanupFunction();