commit f1cb958210cdbdb8bc1721c2985542d3e7923d9c parent ee2f1b4940c36b816e3d07b0839d029cd54c1b7c Author: Jan Dankert <develop@jandankert.de> Date: Sun, 27 Sep 2020 01:04:56 +0200 Enhanced documentation Diffstat:
modules/cms/action/README.md | | | 16 | +++++++++++++++- |
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/modules/cms/action/README.md b/modules/cms/action/README.md @@ -8,5 +8,19 @@ Their mission is to - calling the model - providing all data for the UI. -Contracts: +### View and Post + +Every HTTP-Request contains 2 parameters: +- `action`: The action class is instantiated with this value. Example: The action "example" will instantiate a class "ExampleAction". +- `method`: The method which should be called in this action (see above) + +### View and Post + +The parameter `method` and the HTTP method are deciding, which method is called. + +Example: +`GET /?action=example&method=foo` will call _ExampleAction::fooView()_. +`POST /?action=example&method=foo` will call _ExampleAction::fooPost()_. + +### Contracts: - **no database requests are done here!** Database requests are only done by the model classes. \ No newline at end of file