forked from tsolucio/corebos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole
More file actions
27 lines (19 loc) · 629 Bytes
/
console
File metadata and controls
27 lines (19 loc) · 629 Bytes
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
#!/usr/bin/env php
<?php
// application.php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
$files = glob( __DIR__ . '/build/console/*.php');
foreach ($files as $file) {
require_once $file;
}
$classes = get_declared_classes();
$offset = array_search("Symfony\Component\Console\Command\Command", $classes);
$length = count($classes);
include_once('include/database/PearDatabase.php');
include_once('include/utils/utils.php');
$application = new Application("CoreBOS","1.0");
for ($i = $offset + 1 ; $i < $length; $i++) {
$application->add( new $classes[$i]() );
}
$application->run();