1 | <?php |
||
14 | class SilverstripeApplication extends SymfonyApplication |
||
|
|||
15 | { |
||
16 | |||
17 | /** |
||
18 | * The output from the previous command. |
||
19 | * |
||
20 | * @var \Symfony\Component\Console\Output\BufferedOutput |
||
21 | */ |
||
22 | protected $lastOutput; |
||
23 | |||
24 | public function __construct() |
||
36 | |||
37 | public function run($input = null, $output = null) |
||
41 | |||
42 | /** |
||
43 | * Run an Artisan console command by name. |
||
44 | * |
||
45 | * @param string $command |
||
46 | * @param array $parameters |
||
47 | * @return int |
||
48 | */ |
||
49 | public function call($command, array $parameters = []) |
||
63 | |||
64 | /** |
||
65 | * Get the output for the last run command. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function output() |
||
73 | |||
74 | /** |
||
75 | * Add a command to the console. |
||
76 | * |
||
77 | * @param \Symfony\Component\Console\Command\Command $command |
||
78 | * @return \Symfony\Component\Console\Command\Command |
||
79 | */ |
||
80 | public function add(SymfonyCommand $command) |
||
84 | |||
85 | /** |
||
86 | * Add the command to the parent instance. |
||
87 | * |
||
88 | * @param \Symfony\Component\Console\Command\Command $command |
||
89 | * @return \Symfony\Component\Console\Command\Command |
||
90 | */ |
||
91 | protected function addToParent(SymfonyCommand $command) |
||
95 | |||
96 | /** |
||
97 | * Get the default input definitions for the applications. |
||
98 | * |
||
99 | * This is used to add the --env option to every available command. |
||
100 | * |
||
101 | * @return \Symfony\Component\Console\Input\InputDefinition |
||
102 | */ |
||
103 | protected function getDefaultInputDefinition() |
||
111 | |||
112 | /** |
||
113 | * Get the global environment option for the definition. |
||
114 | * |
||
115 | * @return \Symfony\Component\Console\Input\InputOption |
||
116 | */ |
||
117 | protected function getEnvironmentOption() |
||
123 | |||
124 | /** |
||
125 | * Load all available commands into the console application |
||
126 | */ |
||
127 | protected function loadCommands() |
||
145 | |||
146 | } |
||
147 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.