*
* Read-only.
*
- * TODO: Currently it doesn't really work in the repository role, there are
+ * @todo Currently it doesn't really work in the repository role, there are
* lots of functions missing. It is used by the WebStore extension in the
* standalone role.
*
* @ingroup FileAbstraction
*/
class UnregisteredLocalFile extends File {
- var $title, $path, $mime, $dims, $metadata;
+ /** @var Title */
+ protected $title;
- /**
- * @var MediaHandler
- */
- var $handler;
+ /** @var string */
+ protected $path;
+
+ /** @var bool|string */
+ protected $mime;
+
+ /** @var array Dimension data */
+ protected $dims;
+
+ /** @var bool|string Handler-specific metadata which will be saved in the img_metadata field */
+ protected $metadata;
+
+ /** @var MediaHandler */
+ public $handler;
/**
* @param string $path Storage path
- * @param $mime string
+ * @param string $mime
* @return UnregisteredLocalFile
*/
static function newFromPath( $path, $mime ) {
}
/**
- * @param $title
- * @param $repo
+ * @param Title $title
+ * @param FileRepo $repo
* @return UnregisteredLocalFile
*/
static function newFromTitle( $title, $repo ) {
* A FileRepo object is not required here, unlike most other File classes.
*
* @throws MWException
- * @param $title Title|bool
- * @param $repo FileRepo|bool
- * @param $path string|bool
- * @param $mime string|bool
+ * @param Title|bool $title
+ * @param FileRepo|bool $repo
+ * @param string|bool $path
+ * @param string|bool $mime
*/
function __construct( $title = false, $repo = false, $path = false, $mime = false ) {
if ( !( $title && $repo ) && !$path ) {
}
/**
- * @param $page int
+ * @param int $page
* @return bool
*/
private function cachePageDimensions( $page = 1 ) {
}
/**
- * @param $page int
- * @return number
+ * @param int $page
+ * @return int
*/
function getWidth( $page = 1 ) {
$dim = $this->cachePageDimensions( $page );
}
/**
- * @param $page int
- * @return number
+ * @param int $page
+ * @return int
*/
function getHeight( $page = 1 ) {
$dim = $this->cachePageDimensions( $page );
}
/**
- * @param $filename String
- * @return Array|bool
+ * @param string $filename
+ * @return array|bool
*/
function getImageSize( $filename ) {
if ( !$this->getHandler() ) {
* The file at the path of $fsFile should not be deleted (or at least
* not until the end of the request). This is mostly a performance hack.
*
- * @param $fsFile FSFile
+ * @param FSFile $fsFile
* @return void
*/
public function setLocalReference( FSFile $fsFile ) {