public function getActiveShopByRequestAsArray(Enlight_Controller_Request_Request
$request) { $host =
$request->
getHttpHost();
if (empty($host)) { return null;
} $requestPath =
$request->
getRequestUri();
$shops =
$this->
getShopsArrayByHost($host);
// returns the right shop depending on the url
$shop =
$this->
findShopForRequest($shops,
$requestPath);
if ($shop !== null
) { return $shop;
} return $this->
getShopArrayByHostAlias($host);
}