!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/php54/usr/share/pear/Symfony/Component/HttpKernel/Controller/   drwxr-xr-x
Free 293.64 GB of 429.69 GB (68.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ControllerResolver.php (4.86 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\HttpKernel\Controller;

use 
Psr\Log\LoggerInterface;
use 
Symfony\Component\HttpFoundation\Request;

/**
 * ControllerResolver.
 *
 * This implementation uses the '_controller' request attribute to determine
 * the controller to execute and uses the request attributes to determine
 * the controller method arguments.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @api
 */
class ControllerResolver implements ControllerResolverInterface
{
    private 
$logger;

    
/**
     * Constructor.
     *
     * @param LoggerInterface $logger A LoggerInterface instance
     */
    
public function __construct(LoggerInterface $logger null)
    {
        
$this->logger $logger;
    }

    
/**
     * {@inheritdoc}
     *
     * This method looks for a '_controller' request attribute that represents
     * the controller name (a string like ClassName::MethodName).
     *
     * @api
     */
    
public function getController(Request $request)
    {
        if (!
$controller $request->attributes->get('_controller')) {
            if (
null !== $this->logger) {
                
$this->logger->warning('Unable to look for the controller as the "_controller" parameter is missing');
            }

            return 
false;
        }

        if (
is_array($controller)) {
            return 
$controller;
        }

        if (
is_object($controller)) {
            if (
method_exists($controller'__invoke')) {
                return 
$controller;
            }

            throw new \
InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.'get_class($controller), $request->getPathInfo()));
        }

        if (
false === strpos($controller':')) {
            if (
method_exists($controller'__invoke')) {
                return new 
$controller();
            } elseif (
function_exists($controller)) {
                return 
$controller;
            }
        }

        
$callable $this->createController($controller);

        if (!
is_callable($callable)) {
            throw new \
InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.'$controller$request->getPathInfo()));
        }

        return 
$callable;
    }

    
/**
     * {@inheritdoc}
     *
     * @api
     */
    
public function getArguments(Request $request$controller)
    {
        if (
is_array($controller)) {
            
$r = new \ReflectionMethod($controller[0], $controller[1]);
        } elseif (
is_object($controller) && !$controller instanceof \Closure) {
            
$r = new \ReflectionObject($controller);
            
$r $r->getMethod('__invoke');
        } else {
            
$r = new \ReflectionFunction($controller);
        }

        return 
$this->doGetArguments($request$controller$r->getParameters());
    }

    protected function 
doGetArguments(Request $request$controller, array $parameters)
    {
        
$attributes $request->attributes->all();
        
$arguments = array();
        foreach (
$parameters as $param) {
            if (
array_key_exists($param->name$attributes)) {
                
$arguments[] = $attributes[$param->name];
            } elseif (
$param->getClass() && $param->getClass()->isInstance($request)) {
                
$arguments[] = $request;
            } elseif (
$param->isDefaultValueAvailable()) {
                
$arguments[] = $param->getDefaultValue();
            } else {
                if (
is_array($controller)) {
                    
$repr sprintf('%s::%s()'get_class($controller[0]), $controller[1]);
                } elseif (
is_object($controller)) {
                    
$repr get_class($controller);
                } else {
                    
$repr $controller;
                }

                throw new \
RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument (because there is no default value or because there is a non optional argument after this one).'$repr$param->name));
            }
        }

        return 
$arguments;
    }

    
/**
     * Returns a callable for the given controller.
     *
     * @param string $controller A Controller string
     *
     * @return mixed A PHP callable
     *
     * @throws \InvalidArgumentException
     */
    
protected function createController($controller)
    {
        if (
false === strpos($controller'::')) {
            throw new \
InvalidArgumentException(sprintf('Unable to find controller "%s".'$controller));
        }

        list(
$class$method) = explode('::'$controller2);

        if (!
class_exists($class)) {
            throw new \
InvalidArgumentException(sprintf('Class "%s" does not exist.'$class));
        }

        return array(new 
$class(), $method);
    }
}

:: 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.0045 ]--