MediaWiki  REL1_19
UploadFromStash Class Reference

Implements uploading from previously stored file. More...

Inheritance diagram for UploadFromStash:
Collaboration diagram for UploadFromStash:

List of all members.

Public Member Functions

 __construct ($user=false, $stash=false, $repo=false)
 getSourceType ()
 initialize ($key, $name= 'upload_file')
 initializeFromRequest (&$request)
 performUpload ($comment, $pageText, $watch, $user)
 Perform the upload, then remove the database record afterward.
 stashFile ()
 Stash the file.
 stashSession ()
 This should return the key instead of the UploadStashFile instance, for backward compatibility.
 unsaveUploadedFile ()
 Remove a temporarily kept file stashed by saveTempUploadedFile().

Static Public Member Functions

static isValidKey ($key)
static isValidRequest ($request)

Public Attributes

 $mFileProps
 $mSourceType
 $mVirtualTempPath

Protected Attributes

 $mFileKey

Private Attributes

 $repo
 $stash

Detailed Description

Implements uploading from previously stored file.

Author:
Bryan Tong Minh

Definition at line 8 of file UploadFromStash.php.


Constructor & Destructor Documentation

UploadFromStash::__construct ( user = false,
stash = false,
repo = false 
)
Parameters:
$userUser
$stashUploadStash
$repoFileRepo

Definition at line 22 of file UploadFromStash.php.

References $repo, $stash, $user, RepoGroup\singleton(), and wfDebug().

Here is the call graph for this function:


Member Function Documentation

Returns:
string

Reimplemented from UploadBase.

Definition at line 108 of file UploadFromStash.php.

UploadFromStash::initialize ( key,
name = 'upload_file' 
)
Parameters:
$keystring
$namestring

Definition at line 72 of file UploadFromStash.php.

References UploadBase\getRealPath(), and UploadBase\initializePathInfo().

Referenced by initializeFromRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

Parameters:
$requestWebRequest

Reimplemented from UploadBase.

Definition at line 95 of file UploadFromStash.php.

References initialize().

Here is the call graph for this function:

static UploadFromStash::isValidKey ( key) [static]
Parameters:
$keystring
Returns:
bool

Definition at line 51 of file UploadFromStash.php.

References UploadStash\KEY_FORMAT_REGEX.

Referenced by isValidRequest(), and ApiUpload\selectUploadModule().

Here is the caller graph for this function:

static UploadFromStash::isValidRequest ( request) [static]
Parameters:
$requestWebRequest
Returns:
Boolean

Reimplemented from UploadBase.

Definition at line 61 of file UploadFromStash.php.

References isValidKey().

Referenced by UploadStashTest\testValidRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

UploadFromStash::performUpload ( comment,
pageText,
watch,
user 
)

Perform the upload, then remove the database record afterward.

Parameters:
$commentstring
$pageTextstring
$watchbool
$userUser
Returns:
Status

Reimplemented from UploadBase.

Definition at line 152 of file UploadFromStash.php.

References $comment, $user, and unsaveUploadedFile().

Here is the call graph for this function:

Stash the file.

Returns:
UploadStashFile

Reimplemented from UploadBase.

Definition at line 121 of file UploadFromStash.php.

Referenced by stashSession().

Here is the caller graph for this function:

This should return the key instead of the UploadStashFile instance, for backward compatibility.

Returns:
String

Reimplemented from UploadBase.

Definition at line 132 of file UploadFromStash.php.

References stashFile().

Here is the call graph for this function:

Remove a temporarily kept file stashed by saveTempUploadedFile().

Returns:
success

Definition at line 140 of file UploadFromStash.php.

Referenced by performUpload().

Here is the caller graph for this function:


Member Data Documentation

UploadFromStash::$mFileKey [protected]

Definition at line 9 of file UploadFromStash.php.

UploadFromStash::$mFileProps

Reimplemented from UploadBase.

Definition at line 9 of file UploadFromStash.php.

UploadFromStash::$mSourceType

Reimplemented from UploadBase.

Definition at line 9 of file UploadFromStash.php.

UploadFromStash::$mVirtualTempPath

Definition at line 9 of file UploadFromStash.php.

UploadFromStash::$repo [private]

Definition at line 15 of file UploadFromStash.php.

Referenced by __construct().

UploadFromStash::$stash [private]

Definition at line 12 of file UploadFromStash.php.

Referenced by __construct().


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