Manual:ApiMain.php

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:ApiMain.php and the translation is 50% complete.

Other languages:
English • ‎Türkçe • ‎asturianu • ‎dansk • ‎español • ‎français • ‎português do Brasil • ‎română • ‎русский • ‎ไทย • ‎中文 • ‎日本語 • ‎한국어

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 programatically 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.

Funktioner

getResult()

getResult() gets the ApiResult object associated with the current request.

Se også