* Execute api request. Any errors will be handled if the API was called by the remote client.
*/
public function execute() {
- $this->profileIn();
if ( $this->mInternalMode ) {
$this->executeAction();
} else {
$this->executeActionWithErrorHandling();
}
-
- $this->profileOut();
}
/**
// Reset and print just the error message
ob_clean();
- // If the error occurred during printing, do a printer->profileOut()
- $this->mPrinter->safeProfileOut();
$this->printResult( true );
}
// Printer may not be able to handle errors. This is particularly
// likely if the module returns something for getCustomPrinter().
if ( !$this->mPrinter->canPrintErrors() ) {
- $this->mPrinter->safeProfileOut();
$this->mPrinter = $this->createPrinterByName( self::API_DEFAULT_FORMAT );
}
$this->checkAsserts( $params );
// Execute
- $module->profileIn();
$module->execute();
Hooks::run( 'APIAfterExecute', array( &$module ) );
- $module->profileOut();
$this->reportUnusedParams();
$this->getResult()->cleanUpUTF8();
$printer = $this->mPrinter;
- $printer->profileIn();
$printer->initPrinter( false );
-
$printer->execute();
$printer->closePrinter();
- $printer->profileOut();
}
/**