| 1 | <?php |
||
| 14 | class ServiceContainer |
||
| 15 | { |
||
| 16 | const DEFAULT_CONFIG = __DIR__ . '/../config/'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Retrieves the service container, ensuring only one instance exists. |
||
| 20 | * |
||
| 21 | * @param boolean $reset Creates a new service container, destroying the old one. |
||
| 22 | * @param string $config_file The path to the YAML configuration file defining the service container. |
||
| 23 | * @return Symfony\Component\DependencyInjection\ContainerBuilder The service container. |
||
| 24 | */ |
||
| 25 | 2 | public static function getContainer($reset = false, $config_file = self::DEFAULT_CONFIG) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Creates a new service container. |
||
| 38 | * |
||
| 39 | * @param string $config_file The path to the YAML configuration file defining the service container. |
||
| 40 | * @return Symfony\Component\DependencyInjection\ContainerBuilder The service container. |
||
| 41 | */ |
||
| 42 | 1 | public static function create($config_file = self::DEFAULT_CONFIG) |
|
| 50 | } |
||
| 51 |