File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /*
3+ * (c) Api Postcode <info@api-postcode.nl>
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ */
8+
9+ namespace ApiPostcode \PostcodeBundle \DependencyInjection ;
10+
11+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
12+ use Symfony \Component \Config \FileLocator ;
13+ use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
14+ use Symfony \Component \DependencyInjection \Loader ;
15+
16+ /**
17+ * Class UsoftPostcodeExtension
18+ *
19+ * (c) Api Postcode <info@api-postcode.nl>
20+ */
21+ class ApiPostcodePostcodeExtension extends Extension
22+ {
23+ /**
24+ * {@inheritdoc}
25+ */
26+ public function load (array $ configs , ContainerBuilder $ container )
27+ {
28+ $ configuration = new Configuration ();
29+ $ config = $ this ->processConfiguration ($ configuration , $ configs );
30+
31+ $ container ->setParameter ('postcode_api_key ' , $ config ['api_postcode ' ]['token ' ]);
32+
33+ $ loader = new Loader \YamlFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
34+ $ loader ->load ('services.yml ' );
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments