| author | ymh <ymh.work@gmail.com> |
| Wed, 05 Oct 2011 23:51:31 +0200 | |
| changeset 1 | 06a22ff5d58d |
| child 17 | 81962874e172 |
| permissions | -rw-r--r-- |
|
1
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
namespace IRI\Bundle\WikiTagBundle\DependencyInjection; |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
|
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
use Symfony\Component\Config\FileLocator; |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
use Symfony\Component\DependencyInjection\Loader; |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
|
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
/** |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
* This is the class that loads and manages your bundle configuration |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
* |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
*/ |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
class WikiTagExtension extends Extension |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
{ |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
/** |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
* {@inheritDoc} |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
*/ |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
public function load(array $configs, ContainerBuilder $container) |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
{ |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
$configuration = new Configuration(); |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
$config = $this->processConfiguration($configuration, $configs); |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
|
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
$loader->load('services.yml'); |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
} |
|
06a22ff5d58d
first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
} |