Skip to content

Instantly share code, notes, and snippets.

@janbuecker
Created August 14, 2017 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janbuecker/5cefd7705978d940a16996b031b218bb to your computer and use it in GitHub Desktop.
Save janbuecker/5cefd7705978d940a16996b031b218bb to your computer and use it in GitHub Desktop.
Using Shopware outside of the project
<?php
require __DIR__ . '/../autoload.php';
$kernel = new \Shopware\Kernel('production', false);
$kernel->boot();
$kernel->getContainer();
// access the container
$kernel->getContainer()->get('...');
// use Shopware Globals, e.g. container
Shopware()->Container()->get('...');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment