public function on($event, $handler, $context = null, $priority = 0)
{
// Check wether a priority is
// given in place of a context.
if (is_int($context)) {
// Switch then around
$priority = $context;
$context = null;
}
// When the object is self binding
if ($context === null and $this->_eventBindSelf) {
// Set the context to $this
$context = $this;
}
// Ensure there is a Container
$this->_eventContainer or $this->_eventContainer = new Container();
// Add the event
$this->_eventContainer->on($event, $handler, $context, $priority);
// Remain chainable
return $this;
}