Harald Eilertsen
bb303ebc4c
Some cleanup in Hook API's and tests
...
Clean up duplicated code in include/plugin.php and Zotlabs\Extend\Hook,
making the former just wrappers calling the latter. Also removed the
unnecessary serialization of arrays in Hook::insert, and cleaned up and
expaned the tests a bit.
2026-06-12 21:19:59 +02:00
Harald Eilertsen
81e79eec04
Zotlabs\Extend\Route: Add type annotations
...
Make the code safer by adding type annotations for parameters and return
values.
2026-03-25 15:34:24 +01:00
Harald Eilertsen
7d70f2f0f2
Zotlabs\Extend\Route: Set method visibility
...
Make `Route::set()` private. It is not referenced outside of the class
itself, and is also unsafe as it uncritically replaces the system routes
with whatever value it was passed.
The remaining functions are set to public visibility.
2026-03-25 12:45:44 +01:00
Harald Eilertsen
016a11ad27
Zotlabs\Extend\Route: Add API docs + licence info
2026-03-25 12:33:11 +01:00
Mario
1ec0e91405
fix issue in route and widget unregister: we should remove only if both arguments are different. Also only register routes and widgets if they are not yet registered
2026-03-25 10:16:49 +00:00
Harald Eilertsen
94e5aa172c
Update API docs for hooks
2025-11-29 22:52:30 +01:00
Harald Eilertsen
0dc959d9fe
Deprecate *_config() functions in core.
2024-03-24 09:58:21 +00:00
zotlabs
d71e70bedf
functions to support module and widget registration by plugins. These have identical construction to core modules and widgets and are registered just like hooks during addon load. Also additional Apps functions addon_app_installed() and system_app_installed() which will eventually replace feature_installed() for features which are converted to apps. The convention being used is that the module associated with the app calls the appropriate *_app_installed() function and if not present emits descriptive text about the app and exits. This allows one to click on an 'available' app and learn about it. Once installed, the app module behaves normally and may offer functionality or what once were addon settings on the settings/featured page. Refer to zap-addons in the zap repository for examples of how this is being used to eliminate the 'additional features' and 'addon settings' pages.
2018-07-12 16:23:32 -07:00
Klaus Weidenbach
1a737be2b4
💡 Improving Doxygen documentation.
...
Fix some Doxygen parsing errors.
Improve hooks documentation.
2017-11-03 23:04:27 +01:00
zotlabs
5ed5c76d3f
new function Hook::register_array() to bulk register several hooks from the same file with default settings
2017-05-01 18:02:00 -07:00
redmatrix
bad5057a74
start removing db backticks
2016-10-03 19:47:36 -07:00
redmatrix
6602ff83dd
start removing reserved words from database column names (this run: addon and hook)
2016-05-30 19:44:30 -07:00
redmatrix
bb96f44861
allow engineering units (e.g. 400M, 1G) as service class limits
2016-04-28 21:02:27 -07:00
redmatrix
2ddd03f597
provide a Hook method to unregister all hooks with a given filespec component. This will be useful in upgrading plugins to use new interfaces, as you won't have to individually unregister hook declarations that you are no longer using in the code.
2016-04-27 22:44:06 -07:00
redmatrix
df2990b27e
Class method support for hooks
2016-04-23 15:16:54 -07:00
redmatrix
1ff189ee90
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.
2016-04-21 17:03:05 -07:00