Свойство | Type | Description | |
---|---|---|---|
$edittoken | |||
$error | |||
$exists | |||
$filename | |||
$history | |||
$info | |||
$invalid | |||
$wikimate |
Méthode | Description | |
---|---|---|
__construct ( string $filename, Wikimate $wikimate ) | Constructs a WikiFile object from the filename given and associate with the passed Wikimate object. | |
__destruct ( ) : |
Forget all object properties. | |
delete ( string $reason = null, string $archivename = null ) : boolean | Delete the file, or only an older revision of it. | |
destroy ( ) | Alias of self::__destruct(). | |
downloadData ( ) : mixed | Downloads and returns the current file's contents, or null if an error occurs. | |
downloadFile ( string $path ) : boolean | Downloads the current file's contents and writes it to the given path. | |
exists ( ) : boolean | Returns the file existence status. | |
getArchivename ( mixed $revision ) : mixed | Returns the archive name of the specified file revision. | |
getAspectRatio ( ) : float | Returns the aspect ratio of this image, or 0 if file is not an image (and thus has no dimensions). | |
getBitDepth ( ) : integer | Returns the bit depth of this file. | |
getCanonicalTitle ( ) : string | Returns the canonical title of this file. | |
getComment ( ) : string | Returns the edit comment of this file. | |
getCommonMetadata ( ) : array | Returns the common metadata of this file. | |
getDescriptionUrl ( ) : string | Returns the description URL of this file. | |
getError ( ) : mixed | Returns the latest error if there is one. | |
getExtendedMetadata ( ) : array | Returns the extended metadata of this file. | |
getFilename ( ) : string | Returns the name of this file. | |
getHeight ( ) : integer | Returns the height of this file. | |
getHistory ( boolean $refresh = false, integer $limit = null, string $startts = null, string $endts = null ) : mixed | Returns the revision history of this file with all properties. | |
getInfo ( boolean $refresh = false, array $history = null ) : mixed | Gets the information of the file. If refresh is true, then this method will query the wiki API again for the file details. | |
getMediaType ( ) : string | Returns the media type of this file. | |
getMetadata ( ) : array | Returns the Exif metadata of this file. | |
getMime ( ) : string | Returns the MIME type of this file. | |
getParsedComment ( ) : string | Returns the parsed edit comment of this file. | |
getRevision ( mixed $revision ) : mixed | Returns the properties of the specified file revision. | |
getSha1 ( ) : string | Returns the SHA-1 hash of this file. | |
getSize ( ) : integer | Returns the size of this file. | |
getThumbMime ( ) : string | Returns the MIME type of this file's thumbnail, or null if property not available. | |
getTimestamp ( ) : string | Returns the timestamp of this file. | |
getUrl ( ) : string | Returns the URL of this file. | |
getUser ( ) : string | Returns the user who uploaded this file. | |
getUserId ( ) : integer | Returns the ID of the user who uploaded this file. | |
getWidth ( ) : integer | Returns the width of this file. | |
uploadData ( string $data, string $comment, string $text = null, boolean $overwrite = false ) : boolean | Uploads the given contents to the current file. | |
uploadFile ( string $path, string $comment, string $text = null, boolean $overwrite = false ) : boolean | Reads contents from the given path and uploads it to the current file. | |
uploadFromUrl ( string $url, string $comment, string $text = null, boolean $overwrite = false ) : boolean | Uploads file contents from the given URL to the current file. |
Méthode | Description | |
---|---|---|
uploadCommon ( array $params, string $comment, string $text = null, boolean $overwrite = false ) : boolean | Uploads to the current file using the given parameters. |
public __construct ( string $filename, Wikimate $wikimate ) | ||
$filename | string | Name of the wiki file |
$wikimate | Wikimate | Wikimate object |
public downloadData ( ) : mixed | ||
Résultat | mixed | Contents (string), or null if error |
public downloadFile ( string $path ) : boolean | ||
$path | string | The file path to write to |
Résultat | boolean | True if path was written successfully |
public getArchivename ( mixed $revision ) : mixed | ||
$revision | mixed | The index or timestamp of the revision |
Résultat | mixed | The archive name (string), or null if not found |
public getAspectRatio ( ) : float | ||
Résultat | float | The aspect ratio of this image, or 0 if no dimensions |
public getBitDepth ( ) : integer | ||
Résultat | integer | The bit depth of this file |
public getCanonicalTitle ( ) : string | ||
Résultat | string | The canonical title of this file |
public getComment ( ) : string | ||
Résultat | string | The edit comment of this file |
public getCommonMetadata ( ) : array | ||
Résultat | array | The common metadata of this file |
public getDescriptionUrl ( ) : string | ||
Résultat | string | The description URL of this file |
public getExtendedMetadata ( ) : array | ||
Résultat | array | The extended metadata of this file |
public getFilename ( ) : string | ||
Résultat | string | The name of this file |
public getHistory ( boolean $refresh = false, integer $limit = null, string $startts = null, string $endts = null ) : mixed | ||
$refresh | boolean | True to query the wiki API again |
$limit | integer | The number of file revisions to return (the maximum number by default) |
$startts | string | The start timestamp of the listing (optional) |
$endts | string | The end timestamp of the listing (optional) |
Résultat | mixed | The array of selected file revisions, or null if error |
public getMediaType ( ) : string | ||
Résultat | string | The media type of this file |
public getMetadata ( ) : array | ||
Résultat | array | The metadata of this file |
public getParsedComment ( ) : string | ||
Résultat | string | The parsed edit comment of this file |
public getRevision ( mixed $revision ) : mixed | ||
$revision | mixed | The index or timestamp of the revision |
Résultat | mixed | The properties (array), or null if not found |
public getThumbMime ( ) : string | ||
Résultat | string | The MIME type of this file's thumbnail, or null if unavailable |
public getTimestamp ( ) : string | ||
Résultat | string | The timestamp of this file |
public uploadData ( string $data, string $comment, string $text = null, boolean $overwrite = false ) : boolean | ||
$data | string | The data to upload |
$comment | string | Upload comment for the file |
$text | string | The article text for the file page |
$overwrite | boolean | True to overwrite existing file |
Résultat | boolean | True if uploading was successful |
public uploadFile ( string $path, string $comment, string $text = null, boolean $overwrite = false ) : boolean | ||
$path | string | The file path to upload |
$comment | string | Upload comment for the file |
$text | string | The article text for the file page |
$overwrite | boolean | True to overwrite existing file |
Résultat | boolean | True if uploading was successful |
public uploadFromUrl ( string $url, string $comment, string $text = null, boolean $overwrite = false ) : boolean | ||
$url | string | The URL from which to upload |
$comment | string | Upload comment for the file |
$text | string | The article text for the file page |
$overwrite | boolean | True to overwrite existing file |
Résultat | boolean | True if uploading was successful |