!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)

/usr/share/php/Symfony/Component/Console/Input/   drwxr-xr-x
Free 28.53 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ArrayInput.php (5.64 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\Input;

use 
Symfony\Component\Console\Exception\InvalidArgumentException;
use 
Symfony\Component\Console\Exception\InvalidOptionException;

/**
 * ArrayInput represents an input provided as an array.
 *
 * Usage:
 *
 *     $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ArrayInput extends Input
{
    private 
$parameters;

    public function 
__construct(array $parametersInputDefinition $definition null)
    {
        
$this->parameters $parameters;

        
parent::__construct($definition);
    }

    
/**
     * {@inheritdoc}
     */
    
public function getFirstArgument()
    {
        foreach (
$this->parameters as $param => $value) {
            if (
$param && \is_string($param) && '-' === $param[0]) {
                continue;
            }

            return 
$value;
        }

        return 
null;
    }

    
/**
     * {@inheritdoc}
     */
    
public function hasParameterOption($valuesbool $onlyParams false)
    {
        
$values = (array) $values;

        foreach (
$this->parameters as $k => $v) {
            if (!
\is_int($k)) {
                
$v $k;
            }

            if (
$onlyParams && '--' === $v) {
                return 
false;
            }

            if (
\in_array($v$values)) {
                return 
true;
            }
        }

        return 
false;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getParameterOption($values$default falsebool $onlyParams false)
    {
        
$values = (array) $values;

        foreach (
$this->parameters as $k => $v) {
            if (
$onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) {
                return 
$default;
            }

            if (
\is_int($k)) {
                if (
\in_array($v$values)) {
                    return 
true;
                }
            } elseif (
\in_array($k$values)) {
                return 
$v;
            }
        }

        return 
$default;
    }

    
/**
     * Returns a stringified representation of the args passed to the command.
     *
     * @return string
     */
    
public function __toString()
    {
        
$params = [];
        foreach (
$this->parameters as $param => $val) {
            if (
$param && \is_string($param) && '-' === $param[0]) {
                
$glue = ('-' === $param[1]) ? '=' ' ';
                if (
\is_array($val)) {
                    foreach (
$val as $v) {
                        
$params[] = $param.('' != $v $glue.$this->escapeToken($v) : '');
                    }
                } else {
                    
$params[] = $param.('' != $val $glue.$this->escapeToken($val) : '');
                }
            } else {
                
$params[] = \is_array($val) ? implode(' 'array_map([$this'escapeToken'], $val)) : $this->escapeToken($val);
            }
        }

        return 
implode(' '$params);
    }

    
/**
     * {@inheritdoc}
     */
    
protected function parse()
    {
        foreach (
$this->parameters as $key => $value) {
            if (
'--' === $key) {
                return;
            }
            if (
str_starts_with($key'--')) {
                
$this->addLongOption(substr($key2), $value);
            } elseif (
str_starts_with($key'-')) {
                
$this->addShortOption(substr($key1), $value);
            } else {
                
$this->addArgument($key$value);
            }
        }
    }

    
/**
     * Adds a short option value.
     *
     * @throws InvalidOptionException When option given doesn't exist
     */
    
private function addShortOption(string $shortcut$value)
    {
        if (!
$this->definition->hasShortcut($shortcut)) {
            throw new 
InvalidOptionException(sprintf('The "-%s" option does not exist.'$shortcut));
        }

        
$this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
    }

    
/**
     * Adds a long option value.
     *
     * @throws InvalidOptionException When option given doesn't exist
     * @throws InvalidOptionException When a required value is missing
     */
    
private function addLongOption(string $name$value)
    {
        if (!
$this->definition->hasOption($name)) {
            if (!
$this->definition->hasNegation($name)) {
                throw new 
InvalidOptionException(sprintf('The "--%s" option does not exist.'$name));
            }

            
$optionName $this->definition->negationToName($name);
            
$this->options[$optionName] = false;

            return;
        }

        
$option $this->definition->getOption($name);

        if (
null === $value) {
            if (
$option->isValueRequired()) {
                throw new 
InvalidOptionException(sprintf('The "--%s" option requires a value.'$name));
            }

            if (!
$option->isValueOptional()) {
                
$value true;
            }
        }

        
$this->options[$name] = $value;
    }

    
/**
     * Adds an argument value.
     *
     * @param string|int $name  The argument name
     * @param mixed      $value The value for the argument
     *
     * @throws InvalidArgumentException When argument given doesn't exist
     */
    
private function addArgument($name$value)
    {
        if (!
$this->definition->hasArgument($name)) {
            throw new 
InvalidArgumentException(sprintf('The "%s" argument does not exist.'$name));
        }

        
$this->arguments[$name] = $value;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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