MediaWiki  REL1_19
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

 $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

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 18 of file UploadFromUrlJob.php.


Constructor & Destructor Documentation

UploadFromUrlJob::__construct ( title,
params,
id = 0 
)

Definition at line 31 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 158 of file UploadFromUrlJob.php.

References SESSION_KEYNAME.

Referenced by initializeSessionData(), ApiUpload\selectUploadModule(), and storeResultInSession().

Here is the caller graph for this function:

Initialize the session data.

Sets the intial result to queued.

Definition at line 149 of file UploadFromUrlJob.php.

References getSessionData().

Here is the call graph for this function:

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 104 of file UploadFromUrlJob.php.

References storeResultInSession(), wfMsg(), and wfSetupSession().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

Run the job.

Returns:
boolean success

Reimplemented from Job.

Definition at line 35 of file UploadFromUrlJob.php.

References $result, false, leaveMessage(), User\newFromName(), UploadBase\OK, storeResultInSession(), wfMsg(), and wfSetupSession().

Here is the call graph for this function:

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:
$resultString: the result (Success|Warning|Failure)
$dataKeyString: the key of the extra data
$dataValueMixed: the extra data itself

Definition at line 140 of file UploadFromUrlJob.php.

References $result, and getSessionData().

Referenced by leaveMessage(), and run().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

UploadFromUrlJob::$upload

Definition at line 24 of file UploadFromUrlJob.php.

UploadFromUrlJob::$user [protected]

Definition at line 29 of file UploadFromUrlJob.php.

const UploadFromUrlJob::SESSION_KEYNAME = 'wsUploadFromUrlJobData'

Definition at line 19 of file UploadFromUrlJob.php.

Referenced by getSessionData().


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