This class takes an object, a function, and a namespace. It uses
these to encapsulate a callable that can be triggered. It's the action
part of an event, when triggered it does something. It can be paired
with a filter to enable proper hooks and such. Without a paired filter,
(an object external to this class) it acts when notified by any event.
NOTE: The filter is separate from the handler so that one filter can
be used for multiple handlers ala conduit.
IMPORTANT! - To pass a closure to handler pass it as the function parameter
CHANGELOG
1.0: Created Handler - August 16th, 2013
1.1: Updated getDestination to handle function names - October 7th, 2013
2.0: Integrated with Primus 2 in mind - October 13th, 2015
3.0: integrated observer trait
decoupled from priority
modified constructor to default arguments
set funcitons now determine if exists on call
reformatted for inclusion in phabstractic - July 29th, 2016
This method takes care of the details of getting an event ($e) to
whatever needs to be called. The function/method/class is called
passing the event along.
This works with instance methods, class methods (static), and normal
defined functions, even closures, as long as they accept an
AbstractEvent $e.
NOTE: To use a class method (static), $this->object must be a string