!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/Input/   drwxr-xr-x
Free 294.2 GB of 429.69 GB (68.47%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

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

    
/**
     * Constructor.
     *
     * @param array           $parameters An array of parameters
     * @param InputDefinition $definition A InputDefinition instance
     *
     * @api
     */
    
public function __construct(array $parametersInputDefinition $definition null)
    {
        
$this->parameters $parameters;

        
parent::__construct($definition);
    }

    
/**
     * Returns the first argument from the raw parameters (not parsed).
     *
     * @return string The value of the first argument or null otherwise
     */
    
public function getFirstArgument()
    {
        foreach (
$this->parameters as $key => $value) {
            if (
$key && '-' === $key[0]) {
                continue;
            }

            return 
$value;
        }
    }

    
/**
     * Returns true if the raw parameters (not parsed) contain a value.
     *
     * This method is to be used to introspect the input parameters
     * before they have been validated. It must be used carefully.
     *
     * @param string|array $values The values to look for in the raw parameters (can be an array)
     *
     * @return Boolean true if the value is contained in the raw parameters
     */
    
public function hasParameterOption($values)
    {
        
$values = (array) $values;

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

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

        return 
false;
    }

    
/**
     * Returns the value of a raw option (not parsed).
     *
     * This method is to be used to introspect the input parameters
     * before they have been validated. It must be used carefully.
     *
     * @param string|array $values  The value(s) to look for in the raw parameters (can be an array)
     * @param mixed        $default The default value to return if no result is found
     *
     * @return mixed The option value
     */
    
public function getParameterOption($values$default false)
    {
        
$values = (array) $values;

        foreach (
$this->parameters as $k => $v) {
            if (
is_int($k) && 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 = array();
        foreach (
$this->parameters as $param => $val) {
            if (
$param && '-' === $param[0]) {
                
$params[] = $param . ('' != $val '='.$this->escapeToken($val) : '');
            } else {
                
$params[] = $this->escapeToken($val);
            }
        }

        return 
implode(' '$params);
    }

    
/**
     * Processes command line arguments.
     */
    
protected function parse()
    {
        foreach (
$this->parameters as $key => $value) {
            if (
=== strpos($key'--')) {
                
$this->addLongOption(substr($key2), $value);
            } elseif (
'-' === $key[0]) {
                
$this->addShortOption(substr($key1), $value);
            } else {
                
$this->addArgument($key$value);
            }
        }
    }

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

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

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

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

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

            
$value $option->isValueOptional() ? $option->getDefault() : true;
        }

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

    
/**
     * Adds an argument value.
     *
     * @param string $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.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0999 ]--