protected function filterThemesConfigPathsInSameFolder($config, array $allConfigs)
{
// First we extract the relative path for the 'theme.xml' config file
$rPath = $this->extractRelativePathFrom($config);
// Now we extract the relative path of the theme folder.
$rPath = $this->extractRelativePathFrom(substr($rPath, 0, -1));
$inFolder = array();
$length = strlen($rPath);
foreach ($allConfigs as $id => $cnf) {
if (strncmp($cnf, $rPath, $length) == 0) {
$inFolder[$id] = $cnf;
}
}
return $inFolder;
}