MediaWiki  REL1_22
ApiImageRotate Class Reference
Inheritance diagram for ApiImageRotate:
Collaboration diagram for ApiImageRotate:

List of all members.

Public Member Functions

 __construct ($main, $action)
 execute ()
 Evaluates the parameters, performs the requested query, and sets up the result.
 getAllowedParams ($flags=0)
 getDescription ()
 Returns the description string for this module.
 getExamples ()
 Returns usage examples for this module.
 getParamDescription ()
 Returns an array of parameter descriptions.
 getPossibleErrors ()
 Returns a list of all possible errors returned by the module.
 getTokenSalt ()
 Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token You have also to override needsToken() Value is passed to User::getEditToken.
 isWriteMode ()
 Indicates whether this module requires write mode.
 mustBePosted ()
 Indicates whether this module must be called with a POST request.
 needsToken ()
 Returns whether this module requires a token to execute It is used to show possible errors in action=paraminfo see bug 25248.

Protected Member Functions

 checkPermissions ($user, $title)
 Checks that the user has permissions to perform rotations.

Private Member Functions

 getPageSet ()
 Get a cached instance of an ApiPageSet object.

Static Private Member Functions

static addValues (array &$result, $values, $flag=null, $name=null)
 Add all items from $values into the result.

Private Attributes

 $mPageSet = null

Detailed Description

Definition at line 24 of file ApiImageRotate.php.


Constructor & Destructor Documentation

ApiImageRotate::__construct ( main,
action 
)

Definition at line 27 of file ApiImageRotate.php.


Member Function Documentation

static ApiImageRotate::addValues ( array &$  result,
values,
flag = null,
name = null 
) [static, private]

Add all items from $values into the result.

Parameters:
array$resultoutput
array$valuesvalues to add
string$flagthe name of the boolean flag to mark this element
string$nameif given, name of the value

Definition at line 38 of file ApiImageRotate.php.

References $name, ApiQueryBase\addTitleInfo(), array(), and as.

Referenced by execute().

ApiImageRotate::checkPermissions ( user,
title 
) [protected]

Checks that the user has permissions to perform rotations.

Parameters:
User$userThe user to check
Title$title
Returns:
string|null Permission error message, or null if there is no error

Definition at line 157 of file ApiImageRotate.php.

References $title, $user, and ApiBase\parseMsg().

Referenced by execute().

Evaluates the parameters, performs the requested query, and sets up the result.

Concrete implementations of ApiBase must override this method to provide whatever functionality their module offers. Implementations must not produce any output on their own and are not expected to handle any errors.

The execute() method will be invoked directly by ApiMain immediately before the result of the module is output. Aside from the constructor, implementations should assume that no other methods will be called externally on the module before the result is processed.

The result data should be stored in the ApiResult object available through getResult().

Reimplemented from ApiBase.

Definition at line 55 of file ApiImageRotate.php.

References $comment, $ext, $file, $params, $result, $title, ApiQueryBase\addTitleInfo(), addValues(), array(), as, checkPermissions(), ApiBase\extractRequestParams(), TempFSFile\factory(), ApiBase\getModuleName(), getPageSet(), ApiBase\getResult(), ContextSource\getUser(), wfFindFile(), and wfMessage().

Returns the description string for this module.

Returns:
mixed string or array of strings

Reimplemented from ApiBase.

Definition at line 205 of file ApiImageRotate.php.

Returns usage examples for this module.

Return false if no examples are available.

Returns:
bool|string|array

Reimplemented from ApiBase.

Definition at line 225 of file ApiImageRotate.php.

References array().

Get a cached instance of an ApiPageSet object.

Returns:
ApiPageSet

Definition at line 144 of file ApiImageRotate.php.

Referenced by execute(), getAllowedParams(), getParamDescription(), and getPossibleErrors().

Returns an array of parameter descriptions.

Don't call this function directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.

Returns:
array|bool False on no parameter descriptions

Reimplemented from ApiBase.

Definition at line 197 of file ApiImageRotate.php.

References array(), and getPageSet().

Returns a list of all possible errors returned by the module.

Don't call this function directly: use getFinalPossibleErrors() to allow hooks to modify parameters as needed.

Returns:
array in the format of array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )

Reimplemented from ApiBase.

Definition at line 217 of file ApiImageRotate.php.

References getPageSet().

Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token You have also to override needsToken() Value is passed to User::getEditToken.

Returns:
bool|string|array

Reimplemented from ApiBase.

Definition at line 213 of file ApiImageRotate.php.

Indicates whether this module requires write mode.

Returns:
bool

Reimplemented from ApiBase.

Definition at line 176 of file ApiImageRotate.php.

Indicates whether this module must be called with a POST request.

Returns:
bool

Reimplemented from ApiBase.

Definition at line 172 of file ApiImageRotate.php.

Returns whether this module requires a token to execute It is used to show possible errors in action=paraminfo see bug 25248.

Returns:
bool

Reimplemented from ApiBase.

Definition at line 209 of file ApiImageRotate.php.


Member Data Documentation

ApiImageRotate::$mPageSet = null [private]

Definition at line 25 of file ApiImageRotate.php.


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