/** * @param ShopwareShop $shop * @param ShopwareConfig $config * @return Context */ public static function createFromShop(ShopwareShop $shop, ShopwareConfig $config) { $self = new self($shop->getHost(), $shop->getBaseUrl(), $shop->getAlwaysSecure() || $shop->getSecure(), []); $self->setShopId($shop->getId()); $self->setUrlToLower($config->get('routerToLower')); $self->setBaseFile($config->get('baseFile')); $self->setAlwaysSecure($shop->getAlwaysSecure()); $self->setRemoveCategory((bool) $config->get('routerRemoveCategory')); return $self; }