Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Commit

Permalink
core-1652 update spryker/spryker
Browse files Browse the repository at this point in the history
  • Loading branch information
stereomon committed Aug 3, 2017
1 parent b1bb1cc commit e7ae237
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 762 deletions.
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,38 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

/**
* This class can be removed when EventJournal Service Provider is removed from the extended one.
*/

namespace PyzTest\Shared\Testify\Helper\Bootstrap;

use Pyz\Shared\Application\Business\Routing\SilexRouter;
use Pyz\Shared\Application\Plugin\Provider\WebProfilerServiceProvider;
use Pyz\Yves\Application\Plugin\Provider\ApplicationControllerProvider;
use Pyz\Yves\Application\Plugin\Provider\ApplicationServiceProvider;
use Pyz\Yves\Application\Plugin\Provider\AutoloaderCacheServiceProvider;
use Pyz\Yves\Application\Plugin\Provider\LanguageServiceProvider;
use Pyz\Yves\Application\Plugin\Provider\YvesSecurityServiceProvider;
use Pyz\Yves\Calculation\Plugin\Provider\CalculationControllerProvider;
use Pyz\Yves\Cart\Plugin\Provider\CartControllerProvider;
use Pyz\Yves\Application\YvesBootstrap as ApplicationYvesBootstrap;
use Pyz\Yves\Cart\Plugin\Provider\CartServiceProvider;
use Pyz\Yves\Catalog\Plugin\Provider\CatalogControllerProvider;
use Pyz\Yves\Category\Plugin\Provider\CategoryServiceProvider;
use Pyz\Yves\Checkout\Plugin\Provider\CheckoutControllerProvider;
use Pyz\Yves\Collector\Plugin\Router\StorageRouter;
use Pyz\Yves\Customer\Plugin\Provider\CustomerControllerProvider;
use Pyz\Yves\Customer\Plugin\Provider\CustomerSecurityServiceProvider;
use Pyz\Yves\Glossary\Plugin\Provider\TranslationServiceProvider;
use Pyz\Yves\Heartbeat\Plugin\Provider\HeartbeatControllerProvider;
use Pyz\Yves\Newsletter\Plugin\Provider\NewsletterControllerProvider;
use Pyz\Yves\ProductNew\Plugin\Provider\ProductNewControllerProvider;
use Pyz\Yves\ProductSale\Plugin\Provider\ProductSaleControllerProvider;
use Pyz\Yves\ProductSet\Plugin\Provider\ProductSetControllerProvider;
use Pyz\Yves\Twig\Plugin\Provider\TwigServiceProvider;
use Pyz\Yves\Wishlist\Plugin\Provider\WishlistControllerProvider;
use Silex\Provider\FormServiceProvider;
use Silex\Provider\HttpFragmentServiceProvider;
use Silex\Provider\RememberMeServiceProvider;
use Silex\Provider\SecurityServiceProvider;
use Silex\Provider\ServiceControllerServiceProvider;
use Silex\Provider\SessionServiceProvider;
use Silex\Provider\ValidatorServiceProvider;
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Application\ServiceProvider\FormFactoryServiceProvider;
use Spryker\Shared\Application\ServiceProvider\HeadersSecurityServiceProvider;
use Spryker\Shared\Application\ServiceProvider\RoutingServiceProvider;
use Spryker\Shared\Application\ServiceProvider\UrlGeneratorServiceProvider;
use Spryker\Shared\Config\Config;
use Spryker\Yves\Application\Plugin\Provider\CookieServiceProvider;
use Spryker\Yves\Application\Plugin\Provider\ExceptionServiceProvider;
use Spryker\Yves\Application\Plugin\Provider\YvesHstsServiceProvider;
use Spryker\Yves\CmsContentWidget\Plugin\CmsContentWidgetServiceProvider;
use Spryker\Yves\Kernel\Application;
use Spryker\Yves\Messenger\Plugin\Provider\FlashMessengerServiceProvider;
use Spryker\Yves\Money\Plugin\ServiceProvider\TwigMoneyServiceProvider;
use Spryker\Yves\Navigation\Plugin\Provider\NavigationTwigServiceProvider;
Expand All @@ -60,33 +48,9 @@
use Spryker\Yves\Storage\Plugin\Provider\StorageCacheServiceProvider;
use Spryker\Yves\Twig\Plugin\ServiceProvider\TwigServiceProvider as SprykerTwigServiceProvider;

class YvesBootstrap
class YvesBootstrap extends ApplicationYvesBootstrap
{

/**
* @var \Spryker\Yves\Kernel\Application
*/
protected $application;

public function __construct()
{
$this->application = new Application();
}

/**
* @return \Spryker\Yves\Kernel\Application
*/
public function boot()
{
$this->registerServiceProviders();

$this->registerRouters();

$this->registerControllerProviders();

return $this->application;
}

/**
* @return void
*/
Expand Down Expand Up @@ -129,50 +93,4 @@ protected function registerServiceProviders()
$this->application->register(new CmsContentWidgetServiceProvider());
}

/**
* @return void
*/
protected function registerRouters()
{
$this->application->addRouter((new StorageRouter())->setSsl(false));
$this->application->addRouter(new SilexRouter($this->application));
}

/**
* @return void
*/
protected function registerControllerProviders()
{
$isSsl = Config::get(ApplicationConstants::YVES_SSL_ENABLED);

$controllerProviders = $this->getControllerProviderStack($isSsl);

foreach ($controllerProviders as $controllerProvider) {
$this->application->mount($controllerProvider->getUrlPrefix(), $controllerProvider);
}
}

/**
* @param bool|null $isSsl
*
* @return \Pyz\Yves\Application\Plugin\Provider\AbstractYvesControllerProvider[]
*/
protected function getControllerProviderStack($isSsl)
{
return [
new ApplicationControllerProvider($isSsl),
new CheckoutControllerProvider($isSsl),
new CustomerControllerProvider($isSsl),
new CartControllerProvider($isSsl),
new WishlistControllerProvider($isSsl),
new HeartbeatControllerProvider($isSsl),
new NewsletterControllerProvider($isSsl),
new CatalogControllerProvider($isSsl),
new CalculationControllerProvider($isSsl),
new ProductSetControllerProvider($isSsl),
new ProductSaleControllerProvider($isSsl),
new ProductNewControllerProvider($isSsl),
];
}

}
Loading

0 comments on commit e7ae237

Please sign in to comment.