|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: joshgulledge |
|
5
|
|
|
* Date: 2/15/18 |
|
6
|
|
|
* Time: 2:43 PM |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace LCI\Blend; |
|
10
|
|
|
|
|
11
|
|
|
use LCI\MODX\Console\Application as ConsoleApplication; |
|
12
|
|
|
use Symfony\Component\Console\Input\InputArgument; |
|
13
|
|
|
use Symfony\Component\Console\Input\InputDefinition; |
|
14
|
|
|
use Symfony\Component\Console\Input\InputOption; |
|
15
|
|
|
|
|
16
|
|
|
class Application extends ConsoleApplication |
|
17
|
|
|
{ |
|
18
|
|
|
protected static $logo = 'art/blend.txt'; |
|
19
|
|
|
|
|
20
|
|
|
protected static $name = 'Blend Console'; |
|
21
|
|
|
|
|
22
|
|
|
protected static $version = '1.0.0 beta4'; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @return string |
|
26
|
|
|
*/ |
|
27
|
|
|
public function getHelp() |
|
28
|
|
|
{ |
|
29
|
|
|
return parent::getHelp(); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* Gets the default input definition. |
|
34
|
|
|
* |
|
35
|
|
|
* @return InputDefinition An InputDefinition instance |
|
36
|
|
|
*/ |
|
37
|
|
|
protected function getDefaultInputDefinition() |
|
38
|
|
|
{ |
|
39
|
|
|
return new InputDefinition(array( |
|
40
|
|
|
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), |
|
41
|
|
|
|
|
42
|
|
|
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'), |
|
43
|
|
|
//new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.'), |
|
44
|
|
|
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display the Blend version.'), |
|
45
|
|
|
)); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @return bool|string |
|
50
|
|
|
*/ |
|
51
|
|
|
protected function getArt() |
|
52
|
|
|
{ |
|
53
|
|
|
return file_get_contents(__DIR__.'/'.self::$logo); |
|
54
|
|
|
} |
|
55
|
|
|
} |