src/ADT/Event/Handler.php
public function bind( $key, $callback ){
		if( is_callable( $callback ) )
			$callback	= new ADT_Event_Callback( $callback );
		if( !( $callback instanceof ADT_Event_Callback ) )
			throw new InvalidArgumentException( 'Callback must be function or instance of ADT_Event_Callback' );
		if( !is_array( $list = $this->events->get( $key ) ) )
			$list	= array();
		$list[]	= array( $key, $callback );
		$this->events->set( $key, $list );
	}
public function bind( $key, $callback ){
		if( is_callable( $callback ) )
			$callback	= new ADT_Event_Callback( $callback );
		if( !( $callback instanceof ADT_Event_Callback ) )
			throw new InvalidArgumentException( 'Callback must be function or instance of ADT_Event_Callback' );
		if( !is_array( $list = $this->events->get( $key ) ) )
			$list	= array();
		$list[]	= array( $key, $callback );
		$this->events->set( $key, $list );
	}
public function bind ( $ key , $ callback ) { if ( is_callable ( $ callback ) ) $ callback = new ADT_Event_Callback ( $ callback ) ; if ( ! ( $ callback instanceof ADT_Event_Callback ) ) throw new InvalidArgumentException ( 'Callback must be function or instance of ADT_Event_Callback' ) ; if ( ! is_array ( $ list = $ this -> events -> get ( $ key ) ) ) $ list = array ( ) ; $ list [ ] = array ( $ key , $ callback ) ; $ this -> events -> set ( $ key , $ list ) ; }
Bind event.
@access		public
@param		string						$key		Event key, eg. "start.my"
@param		function|ADT_Event_Callback	$callback	Callback function or object
@return		void
Bind event .