1 | <?php |
||
10 | class Tail extends Command |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'tail'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'tail command'; |
||
25 | |||
26 | /** |
||
27 | * $files. |
||
28 | * |
||
29 | * @var Filesystem |
||
30 | */ |
||
31 | protected $files; |
||
32 | |||
33 | /** |
||
34 | * __construct. |
||
35 | * |
||
36 | * @param Filesystem $files |
||
37 | */ |
||
38 | 2 | public function __construct(Filesystem $files) |
|
44 | |||
45 | /** |
||
46 | * Handle the command. |
||
47 | * |
||
48 | * @throws \InvalidArgumentException |
||
49 | */ |
||
50 | 2 | public function handle() |
|
72 | |||
73 | /** |
||
74 | * readLine. |
||
75 | * |
||
76 | * @param string $file |
||
77 | * @param int $lines |
||
78 | */ |
||
79 | protected function readLine($file, $lines = 50) |
||
102 | 2 | ||
103 | /** |
||
104 | * Get the console command arguments. |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | protected function getArguments() |
||
114 | |||
115 | /** |
||
116 | * Get the console command options. |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | protected function getOptions() |
||
126 | } |
||
127 |