1 | <?php namespace Arcanedev\LaravelLang\Commands; |
||
15 | class PublishCommand extends Command |
||
16 | { |
||
17 | /* ------------------------------------------------------------------------------------------------ |
||
18 | | Properties |
||
19 | | ------------------------------------------------------------------------------------------------ |
||
20 | */ |
||
21 | /** |
||
22 | * The name and signature of the console command. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $signature = 'trans:publish |
||
27 | {locale : The language to publish the translations.} |
||
28 | {--force : Force to override the translations}'; |
||
29 | |||
30 | /** |
||
31 | * The console command description. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $description = 'Publish the [locale] translations.'; |
||
36 | |||
37 | /** |
||
38 | * The TransPublisher instance. |
||
39 | * |
||
40 | * @var \Arcanedev\LaravelLang\Contracts\TransPublisher |
||
41 | */ |
||
42 | private $publisher; |
||
43 | |||
44 | /* ------------------------------------------------------------------------------------------------ |
||
45 | | Constructor |
||
46 | | ------------------------------------------------------------------------------------------------ |
||
47 | */ |
||
48 | /** |
||
49 | * Create a new console command instance. |
||
50 | * |
||
51 | * @param \Arcanedev\LaravelLang\Contracts\TransPublisher $publisher |
||
52 | */ |
||
53 | 60 | public function __construct(TransPublisher $publisher) |
|
60 | |||
61 | /* ------------------------------------------------------------------------------------------------ |
||
62 | | Main Functions |
||
63 | | ------------------------------------------------------------------------------------------------ |
||
64 | */ |
||
65 | /** |
||
66 | * Execute the console command. |
||
67 | */ |
||
68 | 48 | public function handle() |
|
84 | |||
85 | /* ------------------------------------------------------------------------------------------------ |
||
86 | | Other Functions |
||
87 | | ------------------------------------------------------------------------------------------------ |
||
88 | */ |
||
89 | /** |
||
90 | * Publish the translations. |
||
91 | * |
||
92 | * @param string $locale |
||
93 | * @param bool $force |
||
94 | */ |
||
95 | 36 | private function publish($locale, $force) |
|
106 | |||
107 | /** |
||
108 | * Get the console command arguments. |
||
109 | * |
||
110 | * @return array |
||
111 | * |
||
112 | * @codeCoverageIgnore |
||
113 | */ |
||
114 | protected function getArguments() |
||
120 | |||
121 | /** |
||
122 | * Get the console command options. |
||
123 | * |
||
124 | * @return array |
||
125 | * |
||
126 | * @codeCoverageIgnore |
||
127 | */ |
||
128 | protected function getOptions() |
||
134 | } |
||
135 |