-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
23 lines (20 loc) · 787 Bytes
/
index.php
File metadata and controls
23 lines (20 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php declare(strict_types = 1);
require_once (__DIR__ . './bootstrap.php');
try {
$objectManager = \Source\ObjectManager::getInstance();
$parser = $objectManager->get(\Source\Parser\OperationParser::class);
/** @var $parser \Source\Parser\OperationParserInterface */
echo $parser->parseOperations($argv[1])->getOutput();
} catch (\Source\Exception\FileNotFoundException $e) {
die($e->getMessage());
} catch (ReflectionException $e) {
die($e->getMessage());
} catch (JsonException $e) {
die($e->getMessage());
} catch (\Source\Exception\ContainerException $e) {
die($e->getMessage());
} catch (\Source\Exception\OperationTypeException $e) {
die($e->getMessage());
} catch (\Source\Exception\UserTypeException $e) {
die($e->getMessage());
}