-
Notifications
You must be signed in to change notification settings - Fork 0
/
console
executable file
·31 lines (23 loc) · 976 Bytes
/
console
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
30
31
#!/usr/bin/env php
<?php
define('AUTOLOAD_PATH', __DIR__ . '/vendor/autoload.php');
set_time_limit(0);
if (!file_exists(AUTOLOAD_PATH)) {
fwrite(STDERR, 'You must set up the project dependencies.' . PHP_EOL);
exit(1);
}
require_once AUTOLOAD_PATH;
$input = new \Symfony\Component\Console\Input\ArgvInput();
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
$container = new \Symfony\Component\DependencyInjection\ContainerBuilder();
$container->set('console.input', $input);
$container->set('console.output', $output);
$extension = new \Symcloud\Application\BlobStorage\DependencyInjection\BlobStorageExtension();
$container->registerExtension($extension);
$configLoader = new \Symfony\Component\DependencyInjection\Loader\YamlFileLoader(
$container,
new \Symfony\Component\Config\FileLocator(__DIR__ . '/config')
);
$configLoader->load('config.yml');
$container->compile();
$container->get('console.application')->run($input, $output);