Open obaid opened 11 years ago
Good idea, was hoping to use this in Laravel or stand-alone. Would be nice if the al the APN/GCM logic etc was a seperate library, and the bundle just pulled that library in and configured it as Symfony Bundle.
I have the same issue, I managed to do that with some kind of tricks.
$container = new ContainerBuilder();
$container->setParameter('kernel.root_dir', $pathToDirWithConfig);
$container->setParameter('kernel.cache_dir', $pathToCacheDir);
$bundle = new RMSPushNotificationsBundle();
$bundle->build($container)
$extension = $bundle->getContainerExtension();
$container->registerExtension($extension);
$extensions = [$extension->getAlias()];
$container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
$loader = new YamlFileLoader($container, new FileLocator($pathToConfigFile));
$container->compile();
Small part of logic that implemented in Symfony kernel
Hi, Any chance to extract this library for regular PHP usage?