X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=calc%2Fcalc.php;h=3159bf6afccd1593b43f0f4453ca9e55f1b18635;hb=97fcee53c04345271c62df18f44e6fad948a3d0e;hp=7019a80f0d04d4470216869c5f404fca1b469dad;hpb=73b505563be38da1f93c2c86371ce3fc15a809e5;p=friendica-addons.git diff --git a/calc/calc.php b/calc/calc.php index 7019a80f..3159bf6a 100644 --- a/calc/calc.php +++ b/calc/calc.php @@ -5,6 +5,8 @@ * Version: 1.0 * Author: Mike Macgirvin */ + +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; @@ -12,19 +14,21 @@ function calc_install() { Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); } -function calc_app_menu($a,&$b) { +function calc_app_menu(App $a, array &$b) +{ $b['app_menu'][] = '
Calculator
'; } - +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ function calc_module() {} - - - -function calc_init($a) { - -$x = <<< EOT +function calc_init(App $a) +{ + $x = <<< EOT