1 | <?php |
||
18 | class Library extends Command |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Library class instance |
||
23 | * @var \gplcart\core\Library $library |
||
24 | */ |
||
25 | protected $library; |
||
26 | |||
27 | /** |
||
28 | * @param CoreLibrary $library |
||
29 | */ |
||
30 | public function __construct(CoreLibrary $library) |
||
36 | |||
37 | /** |
||
38 | * Callback for "library-clear" command |
||
39 | */ |
||
40 | public function cmdClearLibrary() |
||
41 | { |
||
42 | $this->library->clearCache(); |
||
43 | $this->output(); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Callback for "library-get" command |
||
48 | */ |
||
49 | public function cmdGetLibrary() |
||
56 | |||
57 | /** |
||
58 | * Returns an array of libraries |
||
59 | * @return array |
||
60 | */ |
||
61 | protected function getListLibrary() |
||
81 | |||
82 | /** |
||
83 | * Output libraries in a table |
||
84 | * @param array $items |
||
85 | */ |
||
86 | protected function outputFormatTableLibrary(array $items) |
||
108 | |||
109 | } |
||
110 |