private function isAcyclic()
    {
        $returnValue = (bool) false;

        
        
        // To detect if the dependency graph is acyclic or not,
    	// we first perform a usual Topological Sorting algorithm.
    	// If at the end of the algorith, we still have edges,
    	// the graph is cyclic !
    	
    	
    	$l = array(); // Empty list where elements are sorted.
    	$q = array(); // Set of nodes with no incoming edges.
    	
    	$components = $this->getComponents();
    	$dependencies = $this->getDependencies(); // used as a copy !
    	
    	// Set q with nodes with no incoming edges.
    	foreach ($components as $c){
    		$incomingEdges = false;
    		
    		foreach ($dependencies as $d){
    			if ($c === $d['isDependencyOf']){
    				// $c has incoming edges thus we reject it.
    				$incomingEdges = true;
    				break;
    			}
    		}
    		
    		if ($incomingEdges == false){
    			array_push($q, $c);
    		}
    	}
    	
    	while (count($q) > 0){
    		$n = array_pop($q);
    		array_push($l, $n);
    		
    		foreach ($components as $m){
    			// edge from n to m ?
    			foreach ($dependencies as $k => $dep){
    				if ($dep['component'] === $n && $dep['isDependencyOf'] === $m){
    					unset($dependencies[$k]);
    					
    					// other incoming edges for m ?
    					foreach ($dependencies as $dep){
    						if ($dep['isDependencyOf'] === $m){
    							break 2;
    						}
    					}
    					
    					// no incoming edges from m !
    					array_push($q, $m);
    				}
    			}
    		}
    	}
    	
    	$returnValue = count($dependencies) == 0;
        

        return (bool) $returnValue;
    }