Manuel:ApiMain.php
![]() | Cette page est obsolète. |
Fichier MediaWiki : ApiMain.php | |
---|---|
Emplacement : | includes/api/ |
Code source : | master • 1.39.1 • 1.38.5 • 1.35.9 |
Classes : | ApiMain |
ApiMain est la classe principale de l'API, utilisée à la fois pour le traitement interne comme pour le traitement externe.
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.
Fonctions
getResult()
getResult()
renvoie l'objet ApiResult associé à la requête courante.