protected function getFiles(array $paths, $aclNamespace)
    {
        $result = array();
        $object = '';
        foreach ($paths as $namespace => $path) {
            foreach ($this->rglob('*.js', 0, "$path/") as $entry) {
                $entry = pathinfo($entry);
                $extraNs = str_replace('/', '.', str_replace($path, '', $entry['dirname']));
                $object  = $namespace . $extraNs . '.' . $entry['filename'];
                // Validate against the ACL.
                if ($this->checkAcl("extjs-$aclNamespace-" . $object)) {
                    $result[] = $object;
                }
            }
        }

        return $result;
    }