📂 FileMgr
📍
/home/coemyoza/public_html/wp-content/plugins/give/src/Log/Commands
✏️ Edit File: /home/coemyoza/public_html/wp-content/plugins/give/src/Log/Commands/FlushLogsCommand.php
⬅ Kembali
<?php namespace Give\Log\Commands; use Give\Log\LogRepository; use WP_CLI; /** * Class FlushLogsCommand * @package Give\Log\Commands * * A WP-CLI command for flushing logs */ class FlushLogsCommand { /** * @var LogRepository */ private $logRepository; /** * FlushLogsCommand constructor. * * @param LogRepository $repository */ public function __construct(LogRepository $repository) { $this->logRepository = $repository; } /** * Flush logs * ## EXAMPLE * * wp give flush-logs */ public function __invoke() { try { $this->logRepository->flushLogs(); WP_CLI::success('Logs flushed'); } catch (\Exception $e) { WP_CLI::error($e->getMessage()); } } }
💾 Simpan File
Batal
⬅ Naik ke Log
1 item
Nama
Tipe
Ukuran
Diubah
Aksi
🐘
FlushLogsCommand.php
php
825 B
2022-11-29 18:00
✏️ Edit
👁️ View
🗑 Hapus