src/diacronos/DepGraph/DepGraph.php
/**
	 * Add a direct dependency. Returns `false` if that dependency is a duplicate.
	 * @param   string   $id		dependency identifier
	 * @param   mixed    $object
	 * @return  bool
	 */
Add a direct dependency. Returns `false` if that dependency is a duplicate.
@param   string   $id                dependency identifier
@param   mixed    $object
@return  bool
Add a direct dependency . Returns ` false ` if that dependency is a duplicate . @param string $id dependency identifier @param mixed $object @return bool
public function add($id, $object)
 	{
 		if (isset($this->_map[$id]) == 0) {
 			$this->_map[$id] = array();
 		}
		if (array_search($object, $this->_map[$id]) !== false) {
			return false;
		}
		array_push($this->_map[$id], $object);
		return true;
	}
public function add ( $ id , $ object ) { if ( isset ( $ this -> _map [ $ id ] ) == 0 ) { $ this -> _map [ $ id ] = array ( ) ; } if ( array_search ( $ object , $ this -> _map [ $ id ] ) !== false ) { return false ; } array_push ( $ this -> _map [ $ id ] , $ object ) ; return true ; }
Add a direct dependency.
Add a direct dependency .