* @author Michael Dale
*/
class UploadFromChunks extends UploadFromFile {
+ /** @var LocalRepo */
+ private $repo;
+ /** @var UploadStash */
+ public $stash;
+ /** @var User */
+ public $user;
+
protected $mOffset;
protected $mChunkIndex;
protected $mFileKey;
protected $mVirtualTempPath;
- /** @var LocalRepo */
- private $repo;
+
+ /** @noinspection PhpMissingParentConstructorInspection */
/**
* Setup local pointers to stash, repo and user (similar to UploadFromStash)
if ( $stash ) {
$this->stash = $stash;
} else {
- if ( $user ) {
- wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" );
- } else {
- wfDebug( __METHOD__ . " creating new UploadFromChunks instance with no user\n" );
- }
+ wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" );
$this->stash = new UploadStash( $this->repo, $this->user );
}
}
}
}
}
-
-class UploadChunkZeroLengthFileException extends MWException {
-}
-
-class UploadChunkFileException extends MWException {
-}
-
-class UploadChunkVerificationException extends MWException {
- public $msg;
- public function __construct( array $res ) {
- $this->msg = wfMessage( ...$res );
- parent::__construct( wfMessage( ...$res )
- ->inLanguage( 'en' )->useDatabase( false )->text() );
- }
-}