External functions API: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The [[External functions API]] allows you to create fully | ==Overview== | ||
The [[External functions API]] allows you to create fully parameterised methods that can be accessed by external programs (such as [[Web services]]). | |||
== externallib.php == | == externallib.php == | ||
Line 6: | Line 7: | ||
For more information on how to implement the external function read the [[External_functions_API|External functions API]] documentation. | For more information on how to implement the external function read the [[External_functions_API|External functions API]] documentation. | ||
== Example == | |||
You will find an example of an external.php file in the [https://github.com/moodlehq/moodle-local_wstemplate web service template plugin]. This plugin contains a web service hello_world function. To make testing easy for you, the plugin is distributed with a test client in the folder /client. | |||
==See also== | |||
* [[Core APIs]] |
Revision as of 09:00, 16 January 2012
Overview
The External functions API allows you to create fully parameterised methods that can be accessed by external programs (such as Web services).
externallib.php
- This file is located at the root of your plugin.
- This file is composed by a class that contains the external function referenced in services.php
For more information on how to implement the external function read the External functions API documentation.
Example
You will find an example of an external.php file in the web service template plugin. This plugin contains a web service hello_world function. To make testing easy for you, the plugin is distributed with a test client in the folder /client.