Deze handleiding's pagina is verouderd. For more complete information on current code, please refer to the corresponding class. If you have checked or updated this page and found the content to be suitable, please remove this notice. .
|MediaWiki bestand: ApiMain.php|
|Broncode:||master • 1.34.2 • 1.33.4 • 1.31.8|
ApiMain is the main API class, used for both external and internal processing.
When executed, it will create the requested formatter object, instantiate and execute an object associated with the needed action, and use formatter to print results.
In case of an exception, an error message will be printed using the same formatter.
To call the API programmatically for testing, run it using the FauxRequest object, in which case any internal exceptions will not be handled but passed up to the caller.
After successful execution, use
getResult() for the resulting data.
getResult() gets the ApiResult object associated with the current request.