]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/README.md
Merge pull request #7848 from annando/mail-hooks
[friendica.git] / src / Module / README.md
index 66a4967f333e51fc8ec37156b45c3475c8972385..a723f6a290756ddcf9ad1b40fae71a050e13cfb9 100644 (file)
@@ -16,10 +16,16 @@ A frontend module should extend the [`BaseModule`](https://github.com/friendica/
 
 ### Backend modules
 
-This type of modules mainly responds either with `XML` or with `JSON`. 
+This type of modules mainly responds either with encoded `XML` or with `JSON` output.
+It isn't intended to respond with human readable text.
 
-Rules for Modules:
--      Named like the call (i.e. https://friendica.test/contact => `Contact`)
--      Start with capitals and are **not** camelCased.
--      Directly interacting with a given request (POST or GET)
--      Extending [`BaseModule`](https://github.com/friendica/friendica/blob/develop/src/BaseModule.php).
\ No newline at end of file
+A frontend module should extend the [`BaseModule`](https://github.com/friendica/friendica/blob/develop/src/BaseModule.php), especially the `rawContent()` method.
+### Routing
+
+Every module needs to be accessed within a route.
+The routes are defined inside [`Router->collectRoutes()`](https://github.com/friendica/friendica/blob/develop/src/App/Router.php).
+
+Use the given routes as a pattern for further routes.
+
+The routing library and further documentation can be found [here](https://github.com/nikic/FastRoute).
\ No newline at end of file