Created
July 28, 2015 09:02
-
-
Save Caroga/117b0569dc197809e0a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace CarogaNet\DirectWordpress\ApiBundle\DependencyInjection; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
use Symfony\Component\DependencyInjection\Loader; | |
class ApiExtension extends Extension | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function load(array $configs, ContainerBuilder $container) | |
{ | |
$configuration = new Configuration(); | |
$config = $this->processConfiguration($configuration, $configs); | |
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
$loader->load('parameters.yml'); | |
// $container->setParameter('my.param_name', $value); ? This is weird, since I want the values to be autoloaded from my parameters.yml | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment