31,003
edits
| Line 40: | Line 40: | ||
Adding a new REST service is as easy than adding a file called '''api_mymoduleobject.class.php''' into the directory '''htdocs/module/class'''. | Adding a new REST service is as easy than adding a file called '''api_mymoduleobject.class.php''' into the directory '''htdocs/module/class'''. | ||
You take the example into '''htdocs/commande/class/api_orders.class.php''' | You take the example into '''htdocs/commande/class/api_orders.class.php''' | ||
The framework detects automatically the API and it should be visible into the explorer. | |||
Method and parameters are detected according to introspection done into PHP class of the object ('''htdocs/module/class/object.class.php''') using the '''annotations''' found into the class. | |||
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md | |||