protected function searchPluginDirectories($path) {
        $pluginDirectories = array();
        if ( ($directoryHandle = opendir($path)) == true ) {
            while (($fileOrDir = readdir( $directoryHandle )) !== false) {
                if (is_dir($path. $fileOrDir ) && $fileOrDir !== '.' && $fileOrDir !=='..') {
                    $pluginDirectories[] = $path. $fileOrDir;
                }
            }
        } else {
            throw new PluginException('Invalid plugin path, check the main config.ini file');
        }
        return $pluginDirectories;
    }