-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Cache.php
72 lines (65 loc) · 1.5 KB
/
Cache.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* This file is part of the alphaz Framework.
*
* @author Muhammad Umer Farooq (Malik) <mumerfarooqlablnet01@gmail.com>
*
* @link https://github.com/alphazframework/framework
*
* @author Muhammad Umer Farooq <lablnet01@gmail.com>
*
* @author-profile https://www.facebook.com/Muhammadumerfarooq01/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT
*/
namespace alphaz\Console\Commands;
use alphaz\Cache\Cache as CacheManager;
use alphaz\Console\Command;
use alphaz\Console\Input;
use alphaz\Console\Output;
class Cache extends Command
{
/**
* Sign of the command.
*
* @since 1.0.0
*
* @var string
*/
protected $sign = 'clear:cache';
/**
* Description of the command.
*
* @since 1.0.0
*
* @var string
*/
protected $description = 'Clear the application cache';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Function to handle the class.
*
* @param \alphaz\Console\Output $output
* @param \alphaz\Console\Input $input
* @param array $param
*
* @return void
*/
public function handle(Output $output, Input $input, $param = []): void
{
$c = new CacheManager();
$c->clear();
$output->write('<green>Cache cleared</green>');
}
}