public static function findThemeBootstraps($themesRootPath, $bootstrapPathFile, $bootstrapPathPattern) {

    	$dir = Yii::getAlias('@' . $themesRootPath);
        if (!is_dir($dir)) {
            throw new InvalidParamException("The dir argument must be a directory: $dir");
        }
        $dir = rtrim($dir, DIRECTORY_SEPARATOR);
        $list = [];
        $handle = opendir($dir);
        if ($handle === false) {
            throw new InvalidParamException("Unable to open directory: $dir");
        }
        while (($file = readdir($handle)) !== false) {
            if ($file === '.' || $file === '..') {
                continue;
            }
            $path = $dir . DIRECTORY_SEPARATOR . $file;
            if (is_dir($path)) {
            	list($r, $p) = static::formatBootstrapPath($bootstrapPathPattern, $file, $bootstrapPathFile);
                if (is_file($dir . DIRECTORY_SEPARATOR . $p)) {
                    $list[] = $themesRootPath . '\\' . $r;
                    continue;
                }
            }
        }
        closedir($handle);
        return $list;
    }