MediaWiki  REL1_22
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, $id=0)
 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,
id = 0 
)

Definition at line 44 of file UploadFromUrlJob.php.

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


Member Function Documentation

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

Definition at line 176 of file UploadFromUrlJob.php.

Initialize the session data.

Sets the intial result to queued.

Definition at line 167 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:
$statusStatus

Definition at line 122 of file UploadFromUrlJob.php.

Run the job.

Returns:
boolean success

Reimplemented from Job.

Definition at line 48 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
$dataValueMixed: the extra data itself

Definition at line 158 of file UploadFromUrlJob.php.


Member Data Documentation

UploadFromUrl UploadFromUrlJob::$upload

Definition at line 38 of file UploadFromUrlJob.php.

User UploadFromUrlJob::$user [protected]

Definition at line 42 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: