public function check()
    {
        $returnValue = array();

        
        // Reset what should be reset for another check on the same instance.
        $this->setCheckedComponents(array());
        $this->setReports(array());
        
		$components = $this->getComponents();
		$dependencies = $this->getDependencies();
		$traversed = array();
		
		// Any node that has no incoming edge and is not
		// the root mock should be bound to it.
		foreach ($components as $c){
			$found = false;
			foreach ($this->getDependencies() as $d){
				
				if ($c === $d['isDependencyOf']){
					// Incoming edge(s).
					$found = true;
					break;
				}
			}
			
			// No incoming edge.
			if ($found === false && $c !== $this->getRootComponent()){
				$this->addDependency($c, $this->getRootComponent());
			}
		}
        
		if (count($components) > 0){
	        if (true == $this->isAcyclic()){
	        	
	        	// We go for a Depth First Search in the graph.
	        	$stack = array();
	        	$node = $components[0];
	        	
	        	// Do something with my node.
	        	$status = $this->checkComponent($node);
	        	array_push($traversed, $node); // mark the node as 'traversed'.
	        	
	        	if ($status == common_configuration_Report::VALID){
		        	$stack = self::pushTransitionsOnStack($stack, $this->getTransitions($node)); // put all transitions from the node to stack.
		        	
		   			while (count($stack) > 0){
		   				$transition = array_pop($stack);
		   				$node = $transition['isDependencyOf'];
		   				
		   				// If not already traversed, do something with my node.
		   				if (false == in_array($node, $traversed)){
		   					
		   					// Do something with my node.
		   					$status = $this->checkComponent($node);
		   					array_push($traversed, $node);
		   					
		   					if ($status == common_configuration_Report::VALID){
		   						$stack = self::pushTransitionsOnStack($stack, $this->getTransitions($node));
		   					}
		   				}
		   			}
	        	}
	        	
	        	$returnValue = $this->getReports();
	        }
	        else{
	        	throw new common_configuration_CyclicDependencyException("The dependency graph is cyclic. Please review your dependencies.");
	        }
		}
        
        

        return (array) $returnValue;
    }
public function check()
    {
        $returnValue = array();

        
        // Reset what should be reset for another check on the same instance.
        $this->setCheckedComponents(array());
        $this->setReports(array());
        
		$components = $this->getComponents();
		$dependencies = $this->getDependencies();
		$traversed = array();
		
		// Any node that has no incoming edge and is not
		// the root mock should be bound to it.
		foreach ($components as $c){
			$found = false;
			foreach ($this->getDependencies() as $d){
				
				if ($c === $d['isDependencyOf']){
					// Incoming edge(s).
					$found = true;
					break;
				}
			}
			
			// No incoming edge.
			if ($found === false && $c !== $this->getRootComponent()){
				$this->addDependency($c, $this->getRootComponent());
			}
		}
        
		if (count($components) > 0){
	        if (true == $this->isAcyclic()){
	        	
	        	// We go for a Depth First Search in the graph.
	        	$stack = array();
	        	$node = $components[0];
	        	
	        	// Do something with my node.
	        	$status = $this->checkComponent($node);
	        	array_push($traversed, $node); // mark the node as 'traversed'.
	        	
	        	if ($status == common_configuration_Report::VALID){
		        	$stack = self::pushTransitionsOnStack($stack, $this->getTransitions($node)); // put all transitions from the node to stack.
		        	
		   			while (count($stack) > 0){
		   				$transition = array_pop($stack);
		   				$node = $transition['isDependencyOf'];
		   				
		   				// If not already traversed, do something with my node.
		   				if (false == in_array($node, $traversed)){
		   					
		   					// Do something with my node.
		   					$status = $this->checkComponent($node);
		   					array_push($traversed, $node);
		   					
		   					if ($status == common_configuration_Report::VALID){
		   						$stack = self::pushTransitionsOnStack($stack, $this->getTransitions($node));
		   					}
		   				}
		   			}
	        	}
	        	
	        	$returnValue = $this->getReports();
	        }
	        else{
	        	throw new common_configuration_CyclicDependencyException("The dependency graph is cyclic. Please review your dependencies.");
	        }
		}
        
        

        return (array) $returnValue;
    }
public function check ( ) { $ returnValue = array ( ) ; // Reset what should be reset for another check on the same instance.
 $ this -> setCheckedComponents ( array ( ) ) ; $ this -> setReports ( array ( ) ) ; $ components = $ this -> getComponents ( ) ; $ dependencies = $ this -> getDependencies ( ) ; $ traversed = array ( ) ; // Any node that has no incoming edge and is not
 // the root mock should be bound to it.
 foreach ( $ components as $ c ) { $ found = false ; foreach ( $ this -> getDependencies ( ) as $ d ) { if ( $ c === $ d [ 'isDependencyOf' ] ) { // Incoming edge(s).
 $ found = true ; break ; } } // No incoming edge.
 if ( $ found === false && $ c !== $ this -> getRootComponent ( ) ) { $ this -> addDependency ( $ c , $ this -> getRootComponent ( ) ) ; } } if ( count ( $ components ) > 0 ) { if ( true == $ this -> isAcyclic ( ) ) { // We go for a Depth First Search in the graph.
 $ stack = array ( ) ; $ node = $ components [ 0 ] ; // Do something with my node.
 $ status = $ this -> checkComponent ( $ node ) ; array_push ( $ traversed , $ node ) ; // mark the node as 'traversed'.
 if ( $ status == common_configuration_Report :: VALID ) { $ stack = self :: pushTransitionsOnStack ( $ stack , $ this -> getTransitions ( $ node ) ) ; // put all transitions from the node to stack.
 while ( count ( $ stack ) > 0 ) { $ transition = array_pop ( $ stack ) ; $ node = $ transition [ 'isDependencyOf' ] ; // If not already traversed, do something with my node.
 if ( false == in_array ( $ node , $ traversed ) ) { // Do something with my node.
 $ status = $ this -> checkComponent ( $ node ) ; array_push ( $ traversed , $ node ) ; if ( $ status == common_configuration_Report :: VALID ) { $ stack = self :: pushTransitionsOnStack ( $ stack , $ this -> getTransitions ( $ node ) ) ; } } } } $ returnValue = $ this -> getReports ( ) ; } else { throw new common_configuration_CyclicDependencyException ( "The dependency graph is cyclic. Please review your dependencies." ) ; } } return ( array ) $ returnValue ; }
Returns an array of Reports.

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@return array
Returns an array of Reports .