From 1ff189ee907e6465dfb35118f789f10e714d38a1 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 21 Apr 2016 17:03:05 -0700 Subject: new hook interface (the old one still works but requires handlers to have two calling arguments; the first of which is no longer used). The new interface is called from Zotlabs\Extend\Hook::register() and allows you to specify which hook version to use. The default will be the new interface with one function argument. We also implement the hook priority field which was always there but needed to be set manually in the DB. This provides a way for two hook handlers that implement the same hook interface to determine which order to be called in the event of conflicts. --- Zotlabs/Extend/Hook.php | 76 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Zotlabs/Extend/Hook.php (limited to 'Zotlabs/Extend') diff --git a/Zotlabs/Extend/Hook.php b/Zotlabs/Extend/Hook.php new file mode 100644 index 000000000..836b29db8 --- /dev/null +++ b/Zotlabs/Extend/Hook.php @@ -0,0 +1,76 @@ +