|  | @@ -56,7 +56,7 @@ class Graph {
 | 
	
		
			
				|  |  |     * TODO support base as a file instead of a directory.
 | 
	
		
			
				|  |  |     *
 | 
	
		
			
				|  |  |     * @param string $base
 | 
	
		
			
				|  |  | -   *   A starting path for file lookup.
 | 
	
		
			
				|  |  | +   *   A starting path or array of paths for file lookup.
 | 
	
		
			
				|  |  |     * @param array $blackList
 | 
	
		
			
				|  |  |     *   An array of file names to reject, whatever their path.
 | 
	
		
			
				|  |  |     * @param string $pattern
 | 
	
	
		
			
				|  | @@ -67,24 +67,25 @@ class Graph {
 | 
	
		
			
				|  |  |     */
 | 
	
		
			
				|  |  |    public function getFiles($base, $blackList = array(),
 | 
	
		
			
				|  |  |      $pattern = '/.*\.(inc|module|php)$/') {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($base,
 | 
	
		
			
				|  |  | -      \FilesystemIterator::KEY_AS_PATHNAME  | \FilesystemIterator::SKIP_DOTS));
 | 
	
		
			
				|  |  |      $files = array();
 | 
	
		
			
				|  |  | -    while ($dir->valid()) {
 | 
	
		
			
				|  |  | -      $name = $dir->key();
 | 
	
		
			
				|  |  | -      if (preg_match($pattern, $name) && !in_array(basename($name), $blackList)) {
 | 
	
		
			
				|  |  | -        $files[] = $name;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      elseif ($this->logger->debugLevel >= LOG_INFO) {
 | 
	
		
			
				|  |  | -        if (in_array(basename($name), $blackList)) {
 | 
	
		
			
				|  |  | -          $this->debug("$name blacklisted.\n", LOG_INFO);
 | 
	
		
			
				|  |  | +    foreach ($base as $start) {
 | 
	
		
			
				|  |  | +      $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($start,
 | 
	
		
			
				|  |  | +        \FilesystemIterator::KEY_AS_PATHNAME  | \FilesystemIterator::SKIP_DOTS));
 | 
	
		
			
				|  |  | +      while ($dir->valid()) {
 | 
	
		
			
				|  |  | +        $name = $dir->key();
 | 
	
		
			
				|  |  | +        if (preg_match($pattern, $name) && !in_array(basename($name), $blackList)) {
 | 
	
		
			
				|  |  | +          $files[] = $name;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        else {
 | 
	
		
			
				|  |  | -          $this->debug("$name does not match source paths.\n", LOG_DEBUG);
 | 
	
		
			
				|  |  | +        elseif ($this->logger->debugLevel >= LOG_INFO) {
 | 
	
		
			
				|  |  | +          if (in_array(basename($name), $blackList)) {
 | 
	
		
			
				|  |  | +            $this->debug("$name blacklisted.\n", LOG_INFO);
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          else {
 | 
	
		
			
				|  |  | +            $this->debug("$name does not match source paths.\n", LOG_DEBUG);
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        $dir->next();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      $dir->next();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      $files = array_unique($files);
 |