/**
  * Build a new Laravel 4 container, add and boot the service to it
  * Used when a Laravel 4 application does not exist from the Facade
  *
  * @return \Illuminate\Container\Container
  */
 public static function make()
 {
     $app = new \Illuminate\Container\Container();
     $service = new self($app);
     $service->boot();
     return $app;
 }
Example #2
0
 /**
  * Static method to start boot kernel without leaving local scope in test helper
  */
 public static function start()
 {
     $kernel = new self('testing', true);
     $kernel->boot();
     $shopwareBootstrap = $kernel->getShopware()->Bootstrap();
     $shopwareBootstrap->Models()->generateAttributeModels();
     $shopwareBootstrap->Plugins()->Core()->ErrorHandler()->registerErrorHandler(E_ALL | E_STRICT);
     /** @var $repository \Shopware\Models\Shop\Repository */
     $repository = $shopwareBootstrap->Models()->getRepository('Shopware\\Models\\Shop\\Shop');
     $shop = $repository->getActiveDefault();
     $shop->registerResources($shopwareBootstrap);
     $_SERVER['HTTP_HOST'] = $shop->getHost();
 }
 /**
  * Static method to start boot kernel without leaving local scope in test helper
  */
 public static function start()
 {
     $kernel = new self('testing', true);
     $kernel->boot();
     $shopwareBootstrap = $kernel->getShopware()->Bootstrap();
     $shopwareBootstrap->Models()->generateAttributeModels();
     $shopwareBootstrap->Plugins()->Core()->ErrorHandler()->registerErrorHandler(E_ALL | E_STRICT);
     /** @var $repository \Shopware\Models\Shop\Repository */
     $repository = $shopwareBootstrap->Models()->getRepository('Shopware\\Models\\Shop\\Shop');
     $shop = $repository->getActiveDefault();
     $shop->registerResources($shopwareBootstrap);
     // correct router context for url building
     $kernel->container->get('router')->setContext(new \Shopware\Components\Routing\Context(Shopware()->Shop()->getHost(), Shopware()->Shop()->getBasePath(), Shopware()->Shop()->getSecure()));
     $_SERVER['HTTP_HOST'] = $shop->getHost();
 }