code/base/observable.php
public function detach($observer)
	{
		$retval = false;

		$key = array_search($observer, $this->_observers);

		if ($key !== false)
		{
			unset($this->_observers[$key]);
			$retval = true;

			foreach ($this->_methods as &$method)
			{
				$k = array_search($key, $method);

				if ($k !== false)
				{
					unset($method[$k]);
				}
			}
		}

		return $retval;
	}
public function detach($observer)
	{
		$retval = false;

		$key = array_search($observer, $this->_observers);

		if ($key !== false)
		{
			unset($this->_observers[$key]);
			$retval = true;

			foreach ($this->_methods as &$method)
			{
				$k = array_search($key, $method);

				if ($k !== false)
				{
					unset($method[$k]);
				}
			}
		}

		return $retval;
	}
public function detach ( $ observer ) { $ retval = false ; $ key = array_search ( $ observer , $ this -> _observers ) ; if ( $ key !== false ) { unset ( $ this -> _observers [ $ key ] ) ; $ retval = true ; foreach ( $ this -> _methods as & $ method ) { $ k = array_search ( $ key , $ method ) ; if ( $ k !== false ) { unset ( $ method [ $ k ] ) ; } } } return $ retval ; }
Detach an observer object

@param   object  $observer  An observer object to detach.

@return  boolean  True if the observer object was detached.

@since   11.1
@deprecated  12.3
Detach an observer object