X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2FAddons.md;h=4a32dc09f430c9a96c477e21412ae6a2869cd454;hb=03a2888b831bd42f58e53226ded0ab923eddb77a;hp=a058753605a1533b18d9cd68a7599ccf6d0a7610;hpb=09cf32926d50c1142e2c0e95dd417d518587d38c;p=friendica.git diff --git a/doc/Addons.md b/doc/Addons.md index a058753605..4a32dc09f4 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -158,13 +158,13 @@ Addons may also act as "modules" and intercept all page requests for a given URL In order for a addon to act as a module it needs to declare an empty function `_module()`. If this function exists, you will now receive all page requests for `https://my.web.site/` - with any number of URL components as additional arguments. -These are parsed into an array $a->argv, with a corresponding $a->argc indicating the number of URL components. -So `https://my.web.site/addon/arg1/arg2` would look for a module named "addon" and pass its module functions the $a App structure (which is available to many components). -This will include: - +These are parsed into the `App\Arguments` object. +So `https://my.web.site/addon/arg1/arg2` would give this: ```php -$a->argc = 3 -$a->argv = array(0 => 'addon', 1 => 'arg1', 2 => 'arg2'); +DI::args()->getArgc(); // = 3 +DI::args()->get(0); // = 'addon' +DI::args()->get(1); // = 'arg1' +DI::args()->get(2); // = 'arg2' ``` To display a module page, you need to declare the function `_content(App $a)`, which defines and returns the page body content. @@ -619,10 +619,6 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep- Hook::callAll('jot_tool', $jotplugins); -### src/Network/FKOAuth1.php - - Hook::callAll('logged_in', $a->user); - ### src/Render/FriendicaSmartyEngine.php Hook::callAll("template_vars", $arr);