1 | <?php |
||
12 | class Tail extends Command implements WebCommand |
||
13 | { |
||
14 | /** |
||
15 | * The console command name. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $name = 'tail'; |
||
20 | |||
21 | /** |
||
22 | * The console command description. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $description = 'tail command'; |
||
27 | |||
28 | /** |
||
29 | * $files. |
||
30 | * |
||
31 | * @var \Illuminate\Filesystem\Filesystem |
||
32 | */ |
||
33 | protected $files; |
||
34 | |||
35 | /** |
||
36 | * __construct. |
||
37 | * |
||
38 | * @param \Illuminate\Filesystem\Filesystem $files |
||
39 | */ |
||
40 | 2 | public function __construct(Filesystem $files) |
|
46 | |||
47 | /** |
||
48 | * Handle the command. |
||
49 | * |
||
50 | * @throws \InvalidArgumentException |
||
51 | */ |
||
52 | 2 | public function handle() |
|
74 | |||
75 | /** |
||
76 | * readLine. |
||
77 | * |
||
78 | * @param string $file |
||
79 | * @param int $lines |
||
80 | * @return string |
||
81 | */ |
||
82 | 2 | protected function readLine($file, $lines = 50) |
|
105 | |||
106 | /** |
||
107 | * Get the console command arguments. |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | 2 | protected function getArguments() |
|
117 | |||
118 | /** |
||
119 | * Get the console command options. |
||
120 | * |
||
121 | * @return array |
||
122 | */ |
||
123 | 2 | protected function getOptions() |
|
129 | } |
||
130 |