!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Component/Console/Formatter/   drwxr-xr-x
Free 294.13 GB of 429.69 GB (68.45%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Formatter;

/**
 * Formatter style class for defining styles.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 *
 * @api
 */
class OutputFormatterStyle implements OutputFormatterStyleInterface
{
    private static 
$availableForegroundColors = array(
        
'black'     => 30,
        
'red'       => 31,
        
'green'     => 32,
        
'yellow'    => 33,
        
'blue'      => 34,
        
'magenta'   => 35,
        
'cyan'      => 36,
        
'white'     => 37
    
);
    private static 
$availableBackgroundColors = array(
        
'black'     => 40,
        
'red'       => 41,
        
'green'     => 42,
        
'yellow'    => 43,
        
'blue'      => 44,
        
'magenta'   => 45,
        
'cyan'      => 46,
        
'white'     => 47
    
);
    private static 
$availableOptions = array(
        
'bold'          => 1,
        
'underscore'    => 4,
        
'blink'         => 5,
        
'reverse'       => 7,
        
'conceal'       => 8
    
);

    private 
$foreground;
    private 
$background;
    private 
$options = array();

    
/**
     * Initializes output formatter style.
     *
     * @param string|null $foreground The style foreground color name
     * @param string|null $background The style background color name
     * @param array       $options    The style options
     *
     * @api
     */
    
public function __construct($foreground null$background null, array $options = array())
    {
        if (
null !== $foreground) {
            
$this->setForeground($foreground);
        }
        if (
null !== $background) {
            
$this->setBackground($background);
        }
        if (
count($options)) {
            
$this->setOptions($options);
        }
    }

    
/**
     * Sets style foreground color.
     *
     * @param string|null $color The color name
     *
     * @throws \InvalidArgumentException When the color name isn't defined
     *
     * @api
     */
    
public function setForeground($color null)
    {
        if (
null === $color) {
            
$this->foreground null;

            return;
        }

        if (!isset(static::
$availableForegroundColors[$color])) {
            throw new \
InvalidArgumentException(sprintf(
                
'Invalid foreground color specified: "%s". Expected one of (%s)',
                
$color,
                
implode(', 'array_keys(static::$availableForegroundColors))
            ));
        }

        
$this->foreground = static::$availableForegroundColors[$color];
    }

    
/**
     * Sets style background color.
     *
     * @param string|null $color The color name
     *
     * @throws \InvalidArgumentException When the color name isn't defined
     *
     * @api
     */
    
public function setBackground($color null)
    {
        if (
null === $color) {
            
$this->background null;

            return;
        }

        if (!isset(static::
$availableBackgroundColors[$color])) {
            throw new \
InvalidArgumentException(sprintf(
                
'Invalid background color specified: "%s". Expected one of (%s)',
                
$color,
                
implode(', 'array_keys(static::$availableBackgroundColors))
            ));
        }

        
$this->background = static::$availableBackgroundColors[$color];
    }

    
/**
     * Sets some specific style option.
     *
     * @param string $option The option name
     *
     * @throws \InvalidArgumentException When the option name isn't defined
     *
     * @api
     */
    
public function setOption($option)
    {
        if (!isset(static::
$availableOptions[$option])) {
            throw new \
InvalidArgumentException(sprintf(
                
'Invalid option specified: "%s". Expected one of (%s)',
                
$option,
                
implode(', 'array_keys(static::$availableOptions))
            ));
        }

        if (
false === array_search(static::$availableOptions[$option], $this->options)) {
            
$this->options[] = static::$availableOptions[$option];
        }
    }

    
/**
     * Unsets some specific style option.
     *
     * @param string $option The option name
     *
     * @throws \InvalidArgumentException When the option name isn't defined
     *
     */
    
public function unsetOption($option)
    {
        if (!isset(static::
$availableOptions[$option])) {
            throw new \
InvalidArgumentException(sprintf(
                
'Invalid option specified: "%s". Expected one of (%s)',
                
$option,
                
implode(', 'array_keys(static::$availableOptions))
            ));
        }

        
$pos array_search(static::$availableOptions[$option], $this->options);
        if (
false !== $pos) {
            unset(
$this->options[$pos]);
        }
    }

    
/**
     * Sets multiple style options at once.
     *
     * @param array $options
     */
    
public function setOptions(array $options)
    {
        
$this->options = array();

        foreach (
$options as $option) {
            
$this->setOption($option);
        }
    }

    
/**
     * Applies the style to a given text.
     *
     * @param string $text The text to style
     *
     * @return string
     */
    
public function apply($text)
    {
        
$codes = array();

        if (
null !== $this->foreground) {
            
$codes[] = $this->foreground;
        }
        if (
null !== $this->background) {
            
$codes[] = $this->background;
        }
        if (
count($this->options)) {
            
$codes array_merge($codes$this->options);
        }

        if (
=== count($codes)) {
            return 
$text;
        }

        return 
sprintf("\033[%sm%s\033[0m"implode(';'$codes), $text);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0996 ]--