+use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
+use Symfony\Component\Config\Loader\LoaderInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\Routing\RouteCollectionBuilder;
+class ApiKernel extends Kernel
+ public function registerBundles()
+ new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
+ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
+ new Symfony\Bundle\TwigBundle\TwigBundle(),
+ new Symfony\Bundle\SecurityBundle\SecurityBundle(),
+ new Symfony\Bundle\MonologBundle\MonologBundle(),
+ new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
+ new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
+ new Doctrine\Bundle\MongoDBSoftDeleteBundle\DoctrineMongoDBSoftDeleteBundle(),
+ new FOS\UserBundle\FOSUserBundle(),
+ new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
+ new FOS\ElasticaBundle\FOSElasticaBundle(),
+ new FOS\RestBundle\FOSRestBundle(),
+ new JMS\DiExtraBundle\JMSDiExtraBundle(),
+ new JMS\AopBundle\JMSAopBundle(),
+ new JMS\SerializerBundle\JMSSerializerBundle(),
+ $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
+ protected function configureRoutes(RouteCollectionBuilder $routes)
+ $routes->import(__DIR__.'/config/api/routing.yml');
+ $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '_wdt');
+ $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '_profiler');
+ //$routes->mount('/', $routes->import('@AppBundle/Controller', 'annotation'));
+ protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
+ // $this->getEnvironment()
+ $loader->load(__DIR__.'/config/api/config.yml');
+ $loader->load(__DIR__.'/config/core/dev.yml');
+ private function useDev()
+ if ($this->getEnvironment() == 'dev') {