Extended global events #59
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-warlock#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, global events have to be static methods and can exist on any class. This is so that the code can be copied and executed within the application context by using a
Hazaar\Warlock\Container
object. TheHazaar\Warlock\Container
class extends from theHazaar\Warlock\Process
class which is the class that defines all the functions used by running processes, such astrigger()
,log()
, etc. These types of global events are defined in configuration asClassName::methodName
.The plan here is to allow methods that are stored in existing services to be executed as global events. These would be defined in the config as
ClassName->methodName
so as to not interfer with the existing functionality and still allow global event code to be stored on any application accessible class. However, defining the config like this would add an additional check that the class extends theHazaar\Warlock\Process
class when it is instantiated. This new object can then be initialised, pretty much exactly how a running Service is, then the method will be executed without the use of a container object.mentioned in merge request !31
created merge request !31 to address this issue
closed via merge request !31
mentioned in commit
0e24068247