aam_framework_service_methods_filter
Purpose
Add callable methods to a service object.
Callback
- Type: Filter.
- Arguments:
$methods,$service. - Return: the filtered first argument.
Example
add_filter('aam_framework_service_methods_filter', function ($methods, $service) {
$methods['myapp_source'] = function () {
return 'custom';
};
return $methods;
}, 10, 2);
Adds a myapp_source() method to service objects; AAM binds the closure to the object.
See the complete hook list.