-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmerlin
executable file
·46 lines (37 loc) · 1.19 KB
/
merlin
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env php
<?php
ini_set('memory_limit', -1);
/**
* @file
* Application entrypoint for the migration framework.
*/
foreach ([__DIR__ . '/../../../vendor/autoload.php', __DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php'] as $file) {
if (file_exists($file)) {
require $file;
break;
}
}
use Symfony\Component\Console\Application;
use Merlin\Command\GenerateCommand;
use Merlin\Command\CrawlCommand;
use Merlin\Command\CacheCommand;
use Merlin\Command\ReportCommand;
/**
* Defines a useful global function to do a var_dump to error_log
*
* @param null $object
*/
function var_error_log($object = null)
{
ob_start(); // start buffer capture
var_dump($object); // dump the values
$contents = ob_get_contents(); // put the buffer into a variable
ob_end_clean(); // end capture
error_log($contents); // log contents of the result of var_dump( $object )
}
$application = new Application;
$application->add(new GenerateCommand);
$application->add(new CrawlCommand);
$application->add(new CacheCommand);
$application->add(new ReportCommand);
$application->run();