1 | <?php namespace Arcanedev\GeoIP\Console; |
||
12 | class ClearCommand extends Command |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Properties |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * The console command name. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $name = 'geoip:clear'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Clear the GeoIP cached data.'; |
||
32 | |||
33 | /** |
||
34 | * Supported cache stores. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $supported = ['apc', 'array', 'memcached', 'redis']; |
||
39 | |||
40 | /** |
||
41 | * The GeoIP Cache instance. |
||
42 | * |
||
43 | * @var \Arcanedev\GeoIP\Contracts\GeoIPCache |
||
44 | */ |
||
45 | private $cache; |
||
46 | |||
47 | /* ----------------------------------------------------------------- |
||
48 | | Constructor |
||
49 | | ----------------------------------------------------------------- |
||
50 | */ |
||
51 | |||
52 | /** |
||
53 | * ClearCommand constructor. |
||
54 | * |
||
55 | * @param \Arcanedev\GeoIP\Contracts\GeoIPCache $cache |
||
56 | */ |
||
57 | public function __construct(GeoIPCache $cache) |
||
63 | |||
64 | /* ----------------------------------------------------------------- |
||
65 | | Main Methods |
||
66 | | ----------------------------------------------------------------- |
||
67 | */ |
||
68 | |||
69 | /** |
||
70 | * Execute the console command. |
||
71 | */ |
||
72 | public function handle() |
||
84 | |||
85 | /* ----------------------------------------------------------------- |
||
86 | | Other Methods |
||
87 | | ----------------------------------------------------------------- |
||
88 | */ |
||
89 | |||
90 | /** |
||
91 | * Get the config repository. |
||
92 | * |
||
93 | * @return \Illuminate\Contracts\Config\Repository |
||
94 | */ |
||
95 | protected function config() |
||
99 | |||
100 | /** |
||
101 | * Get the default cache. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | protected function getDefaultCache() |
||
109 | |||
110 | /** |
||
111 | * Is cache flushing supported. |
||
112 | * |
||
113 | * @return bool |
||
114 | */ |
||
115 | protected function isSupported($default) |
||
120 | } |
||
121 |