forked from ezsystems/ezpublish-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
container.php
29 lines (25 loc) · 810 Bytes
/
container.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* File generates service container instance.
*
* Expects global $config to be set by caller
*
* @internal You can include this file to get started, but note that this is not
* supported way of using the eZ Publish Kernel
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*
* @version //autogentag//
*/
use eZ\Publish\Core\Base\ServiceContainer;
if (!isset($config)) {
throw new \RuntimeException('$config not provided to container.php');
}
// Setup class loader
require_once $config['install_dir'] . '/vendor/autoload.php';
return new ServiceContainer(
$config['container_builder_path'],
$config['install_dir'],
$config['cache_dir']
);