MediaWiki  REL1_24
UploadFromUrlJob Class Reference

Job for asynchronous upload-by-url. More...

Inheritance diagram for UploadFromUrlJob:
Collaboration diagram for UploadFromUrlJob:

List of all members.

Public Member Functions

 __construct ($title, $params)
 initializeSessionData ()
 Initialize the session data.
 run ()
 Run the job.

Static Public Member Functions

static & getSessionData ($key)

Public Attributes

UploadFromUrl $upload
 *
const SESSION_KEYNAME = 'wsUploadFromUrlJobData'

Protected Member Functions

 leaveMessage ($status)
 Leave a message on the user talk page or in the session according to $params['leaveMessage'].
 storeResultInSession ($result, $dataKey, $dataValue)
 Store a result in the session data.

Protected Attributes

User $user
 *

Detailed Description

Job for asynchronous upload-by-url.

This job is in fact an interface to UploadFromUrl, which is designed such that it does not require any globals. If it does, fix it elsewhere, do not add globals in here.

Definition at line 33 of file UploadFromUrlJob.php.


Constructor & Destructor Documentation

UploadFromUrlJob::__construct ( title,
params 
)

Definition at line 40 of file UploadFromUrlJob.php.

References Job\$params, and Job\$title.


Member Function Documentation

static& UploadFromUrlJob::getSessionData ( key) [static]
Parameters:
string$key
Returns:
mixed

Definition at line 178 of file UploadFromUrlJob.php.

Initialize the session data.

Sets the intial result to queued.

Definition at line 169 of file UploadFromUrlJob.php.

UploadFromUrlJob::leaveMessage ( status) [protected]

Leave a message on the user talk page or in the session according to $params['leaveMessage'].

Parameters:
Status$status

Definition at line 122 of file UploadFromUrlJob.php.

Run the job.

Returns:
bool Success

Reimplemented from Job.

Definition at line 44 of file UploadFromUrlJob.php.

UploadFromUrlJob::storeResultInSession ( result,
dataKey,
dataValue 
) [protected]

Store a result in the session data.

Note that the caller is responsible for appropriate session_start and session_write_close calls.

Parameters:
string$resultThe result (Success|Warning|Failure)
string$dataKeyThe key of the extra data
mixed$dataValueThe extra data itself

Definition at line 160 of file UploadFromUrlJob.php.


Member Data Documentation

UploadFromUrl UploadFromUrlJob::$upload

*

Definition at line 36 of file UploadFromUrlJob.php.

User UploadFromUrlJob::$user [protected]

*

Definition at line 38 of file UploadFromUrlJob.php.

const UploadFromUrlJob::SESSION_KEYNAME = 'wsUploadFromUrlJobData'

Definition at line 34 of file UploadFromUrlJob.php.


The documentation for this class was generated from the following file: