/**
* Return true if the API was started by other PHP code using FauxRequest
+ * @return bool
*/
public function isInternalMode() {
return $this->mInternalMode;
/**
* Get the API module object. Only works after executeAction()
+ *
+ * @return ApiBase
*/
public function getModule() {
return $this->mModule;
/**
* Create an instance of an output formatter by its name
+ *
+ * @return ApiFormatBase
*/
public function createPrinterByName( $format ) {
if ( !isset( $this->mFormats[$format] ) ) {
* Replace the result data with the information about an exception.
* Returns the error code
* @param $e Exception
+ * @return string
*/
protected function substituteResultWithError( $e ) {
// Printer may not be initialized if the extractRequestParams() fails for the main module
/**
* Set up for the execution.
+ * @return array
*/
protected function setupExecuteAction() {
// First add the id to the top element
$printer->profileOut();
}
+ /**
+ * @return bool
+ */
public function isReadMode() {
return false;
}
/**
* Get the array mapping module names to class names
+ * @return array
*/
function getModules() {
return $this->mModules;