File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 22
33Change Log được viết theo biểu mẫu tại đây: https://keepachangelog.com/en/1.0.0/
44
5+ ## [ 1.1.8] - 2024/10/13
6+
7+ ### What's Changed
8+
9+ - [x] Add simple CodeIgniter Command
10+
511## [ 1.1.7] - 2024/09/08
612
713### What's Changed
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ defined ('BASEPATH ' ) or exit ('No direct script access allowed ' );
4+
5+ /**
6+ * Class Command
7+ *
8+ * @author 713uk13m <dev@nguyenanhung.com>
9+ * @copyright 713uk13m <dev@nguyenanhung.com>
10+ */
11+ class Command extends HungNG_CI_Base_Controllers
12+ {
13+ public function __construct ()
14+ {
15+ parent ::__construct ();
16+ $ this ->load ->helper ('directory ' );
17+ }
18+
19+ public function index (): void
20+ {
21+ if (!is_cli ()) {
22+ show_404 ();
23+ }
24+ ResponseOutput::writeLn ('CodeIgniter Command Interface ' );
25+ }
26+
27+ public function clean_cache ()
28+ {
29+ if (!is_cli ()) {
30+ show_404 ();
31+ }
32+ $ this ->command_clean_cache_file ();
33+ }
34+
35+ public function clean_opcache ()
36+ {
37+ if (!is_cli ()) {
38+ show_404 ();
39+ }
40+ $ this ->opcache_flush_reset ();
41+ }
42+
43+ public function flush_logs ()
44+ {
45+ if (!is_cli ()) {
46+ show_404 ();
47+ }
48+ $ this ->default_base_flush_logs ();
49+ }
50+ }
You can’t perform that action at this time.
0 commit comments