protected function getSite()
    {
        $currentSite = $this->session->get(self::KEY_SITE);

        if (!$currentSite || (is_integer($currentSite['siteId']) && $currentSite['siteId'] == 0)) {
            $sites = $this->getAvailableSites();
            if (count($sites) > 0) {
                $site = array_shift($sites);
                $siteId = $site->getSiteId();
                $siteName = $site->getName();
                $locale = $site->getDefaultLanguage();
                $languages = $site->getLanguages();
                $this->setSite($siteId, $siteName, $locale, $languages);
                $currentSite = $this->session->get(self::KEY_SITE);
            }
        }

        return $currentSite;
    }