public static function getBrickConfigs($customPath = null)
{
$cacheKey = "brick_configs";
if ($customPath) {
$cacheKey .= "_" . crc32($customPath);
}
try {
$configs = \Zend_Registry::get($cacheKey);
} catch (\Exception $e) {
$configs = [];
foreach (self::getBrickDirectories($customPath) as $areaName => $path) {
try {
$configs[$areaName] = new \Zend_Config_Xml($path . "/area.xml");
} catch (\Exception $e) {
Logger::error("Unable to initalize brick with id: " . $areaName);
Logger::error($e);
}
}
\Zend_Registry::set($cacheKey, $configs);
}
return $configs;
}