diff options
Diffstat (limited to 'includes/filerepo/UnregisteredLocalFile.php')
-rw-r--r-- | includes/filerepo/UnregisteredLocalFile.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/includes/filerepo/UnregisteredLocalFile.php b/includes/filerepo/UnregisteredLocalFile.php index 990a218c..2df9a9b5 100644 --- a/includes/filerepo/UnregisteredLocalFile.php +++ b/includes/filerepo/UnregisteredLocalFile.php @@ -19,16 +19,38 @@ * @ingroup FileRepo */ class UnregisteredLocalFile extends File { - var $title, $path, $mime, $handler, $dims; + var $title, $path, $mime, $dims; + /** + * @var MediaHandler + */ + var $handler; + + /** + * @param $path + * @param $mime + * @return UnregisteredLocalFile + */ static function newFromPath( $path, $mime ) { return new UnregisteredLocalFile( false, false, $path, $mime ); } + /** + * @param $title + * @param $repo + * @return UnregisteredLocalFile + */ static function newFromTitle( $title, $repo ) { return new UnregisteredLocalFile( $title, $repo, false, false ); } + /** + * @throws MWException + * @param $title string + * @param $repo FSRepo + * @param $path string + * @param $mime string + */ function __construct( $title = false, $repo = false, $path = false, $mime = false ) { if ( !( $title && $repo ) && !$path ) { throw new MWException( __METHOD__.': not enough parameters, must specify title and repo, or a full path' ); |