1 | <?php |
||
14 | class Application 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() |
||
33 | |||
34 | /** |
||
35 | * Run an Artisan console command by name. |
||
36 | * |
||
37 | * @param string $command |
||
38 | * @param array $parameters |
||
39 | * @return int |
||
40 | */ |
||
41 | public function call($command, array $parameters = []) |
||
55 | |||
56 | /** |
||
57 | * Get the output for the last run command. |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function output() |
||
65 | |||
66 | /** |
||
67 | * Add a command to the console. |
||
68 | * |
||
69 | * @param \Symfony\Component\Console\Command\Command $command |
||
70 | * @return \Symfony\Component\Console\Command\Command |
||
71 | */ |
||
72 | public function add(SymfonyCommand $command) |
||
73 | { |
||
74 | return $this->addToParent($command); |
||
75 | } |
||
76 | |||
77 | /** |
||
78 | * Add the command to the parent instance. |
||
79 | * |
||
80 | * @param \Symfony\Component\Console\Command\Command $command |
||
81 | * @return \Symfony\Component\Console\Command\Command |
||
82 | */ |
||
83 | protected function addToParent(SymfonyCommand $command) |
||
87 | |||
88 | /** |
||
89 | * Get the default input definitions for the applications. |
||
90 | * |
||
91 | * This is used to add the --env option to every available command. |
||
92 | * |
||
93 | * @return \Symfony\Component\Console\Input\InputDefinition |
||
94 | */ |
||
95 | protected function getDefaultInputDefinition() |
||
103 | |||
104 | /** |
||
105 | * Get the global environment option for the definition. |
||
106 | * |
||
107 | * @return \Symfony\Component\Console\Input\InputOption |
||
108 | */ |
||
109 | protected function getEnvironmentOption() |
||
115 | |||
116 | /** |
||
117 | * Load all available commands into the console application |
||
118 | */ |
||
119 | protected function loadCommands() |
||
137 | |||
138 | } |
||
139 |
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.