public function locate($source)
    {
        $sources = [];
        $normalizedSources = [];
        
        // if the wildcard is at the end of the string, it means that we look for a directory
        $endingWithWilCard = substr($source, strlen($source) - 2) === '/*';
        
        if ($endingWithWilCard) {
            $source = substr($source, 0, strlen($source) - 2);
        }
        
        if (is_dir($source) || $endingWithWilCard) {
            $finder = new Finder();
            $finder
                ->files()
                ->in($this->removeLastSlash($source))
            ;
            
            foreach ($finder as $file) {
                $sources[] = $file;
            }
        } else if (strstr($source, '*') !== false) {
            // if the source contains a wildcard, we use it with the finder component
            $sources = $this->getSourcesFromFinder($source);
        } else {
            $sources[] = $source;
        }
        
        // each found sources should be normalized
        foreach ($sources as $source) {
            $normalizedSources[] = $this
                ->normalizer
                ->normalize($source);
        }
        
        return $normalizedSources;
    }