public function addListener(DBListener $listener, $name = null)
	{
		if($name !== null)
			$this->listeners->offsetSet($name, $listener);
		else
			$this->listeners->append($listener);
	}
public function addListener(DBListener $listener, $name = null)
	{
		if($name !== null)
			$this->listeners->offsetSet($name, $listener);
		else
			$this->listeners->append($listener);
	}
public function addListener ( DBListener $ listener , $ name = null ) { if ( $ name !== null ) $ this -> listeners -> offsetSet ( $ name , $ listener ) ; else $ this -> listeners -> append ( $ listener ) ; }
Adds a DBListener to listen on some events of the DB class
@param DBListener $listener The listener object to register
@param string $name The name of the listener [optional]
Adds a DBListener to listen on some events of the DB class