MediaWiki
REL1_21
|
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 |
Definition at line 24 of file ApiImageRotate.php.
ApiImageRotate::__construct | ( | $ | main, |
$ | action | ||
) |
Definition at line 28 of file ApiImageRotate.php.
static ApiImageRotate::addValues | ( | array &$ | result, |
$ | values, | ||
$ | flag = null , |
||
$ | name = null |
||
) | [static, private] |
Add all items from $values into the result.
array | $result | output |
array | $values | values to add |
string | $flag | the name of the boolean flag to mark this element |
string | $name | if given, name of the value |
Definition at line 39 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.
$user | User The user to check. |
Definition at line 158 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 57 of file ApiImageRotate.php.
References $comment, $ext, $file, $params, $result, $title, $user, ApiQueryBase\addTitleInfo(), addValues(), array(), as, checkPermissions(), ApiBase\extractRequestParams(), TempFSFile\factory(), ApiBase\getModuleName(), getPageSet(), ApiBase\getResult(), ContextSource\getUser(), wfFindFile(), and wfMessage().
ApiImageRotate::getAllowedParams | ( | $ | flags = 0 | ) |
Definition at line 181 of file ApiImageRotate.php.
References $flags, $result, array(), getPageSet(), ApiBase\PARAM_REQUIRED, and ApiBase\PARAM_TYPE.
Returns the description string for this module.
Reimplemented from ApiBase.
Definition at line 207 of file ApiImageRotate.php.
Returns usage examples for this module.
Return false if no examples are available.
Reimplemented from ApiBase.
Definition at line 227 of file ApiImageRotate.php.
References array().
ApiImageRotate::getPageSet | ( | ) | [private] |
Get a cached instance of an ApiPageSet object.
Definition at line 146 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.
Reimplemented from ApiBase.
Definition at line 199 of file ApiImageRotate.php.
References array(), and getPageSet().
Returns a list of all possible errors returned by the module.
Reimplemented from ApiBase.
Definition at line 219 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.
Reimplemented from ApiBase.
Definition at line 215 of file ApiImageRotate.php.
Indicates whether this module requires write mode.
Reimplemented from ApiBase.
Definition at line 177 of file ApiImageRotate.php.
Indicates whether this module must be called with a POST request.
Reimplemented from ApiBase.
Definition at line 173 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.
Reimplemented from ApiBase.
Definition at line 211 of file ApiImageRotate.php.
ApiImageRotate::$mPageSet = null [private] |
Definition at line 26 of file ApiImageRotate.php.