public function on($name, $handler, $data=array(), $append=true)
	{
		$this->ensureEvents();
		
		if ($append || empty($this->_events[$name])) {
		    $this->_events[$name][] = $data ? [$handler, $data] : [$handler];
		} else {
		    array_unshift($this->_events[$name], $data ? [$handler, $data] : [$handler]);
		}
	}
public function on($name, $handler, $data=array(), $append=true)
	{
		$this->ensureEvents();
		
		if ($append || empty($this->_events[$name])) {
		    $this->_events[$name][] = $data ? [$handler, $data] : [$handler];
		} else {
		    array_unshift($this->_events[$name], $data ? [$handler, $data] : [$handler]);
		}
	}
public function on ( $ name , $ handler , $ data = array ( ) , $ append = true ) { $ this -> ensureEvents ( ) ; if ( $ append || empty ( $ this -> _events [ $ name ] ) ) { $ this -> _events [ $ name ] [ ] = $ data ? [ $ handler , $ data ] : [ $ handler ] ; } else { array_unshift ( $ this -> _events [ $ name ] , $ data ? [ $ handler , $ data ] : [ $ handler ] ) ; } }
bind event, if append=false then unshift the first
@param string   $name
@param callable $handler
@param array    $data
@param string   $append default true
@return void
bind event if append = false then unshift the first