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

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/vendor/league/container/src/Definition/   drwxr-xr-x
Free 292.5 GB of 429.69 GB (68.07%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Definition.php (5.36 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

namespace 
Automattic\Kkart\Vendor\League\Container\Definition;

use 
Automattic\Kkart\Vendor\League\Container\Argument\{
    
ArgumentResolverInterfaceArgumentResolverTraitClassNameInterfaceRawArgumentInterface
};
use 
Automattic\Kkart\Vendor\League\Container\ContainerAwareTrait;
use 
ReflectionClass;
use 
ReflectionException;

class 
Definition implements ArgumentResolverInterfaceDefinitionInterface
{
    use 
ArgumentResolverTrait;
    use 
ContainerAwareTrait;

    
/**
     * @var string
     */
    
protected $alias;

    
/**
     * @var mixed
     */
    
protected $concrete;

    
/**
     * @var boolean
     */
    
protected $shared false;

    
/**
     * @var array
     */
    
protected $tags = [];

    
/**
     * @var array
     */
    
protected $arguments = [];

    
/**
     * @var array
     */
    
protected $methods = [];

    
/**
     * @var mixed
     */
    
protected $resolved;

    
/**
     * Constructor.
     *
     * @param string $id
     * @param mixed  $concrete
     */
    
public function __construct(string $id$concrete null)
    {
        
$concrete $concrete ?? $id;

        
$this->alias    $id;
        
$this->concrete $concrete;
    }

    
/**
     * {@inheritdoc}
     */
    
public function addTag(string $tag) : DefinitionInterface
    
{
        
$this->tags[$tag] = true;

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function hasTag(string $tag) : bool
    
{
        return isset(
$this->tags[$tag]);
    }

    
/**
     * {@inheritdoc}
     */
    
public function setAlias(string $id) : DefinitionInterface
    
{
        
$this->alias $id;

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getAlias() : string
    
{
        return 
$this->alias;
    }

    
/**
     * {@inheritdoc}
     */
    
public function setShared(bool $shared true) : DefinitionInterface
    
{
        
$this->shared $shared;

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function isShared() : bool
    
{
        return 
$this->shared;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getConcrete()
    {
        return 
$this->concrete;
    }

    
/**
     * {@inheritdoc}
     */
    
public function setConcrete($concrete) : DefinitionInterface
    
{
        
$this->concrete $concrete;
        
$this->resolved null;

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function addArgument($arg) : DefinitionInterface
    
{
        
$this->arguments[] = $arg;

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function addArguments(array $args) : DefinitionInterface
    
{
        foreach (
$args as $arg) {
            
$this->addArgument($arg);
        }

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function addMethodCall(string $method, array $args = []) : DefinitionInterface
    
{
        
$this->methods[] = [
            
'method'    => $method,
            
'arguments' => $args
        
];

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function addMethodCalls(array $methods = []) : DefinitionInterface
    
{
        foreach (
$methods as $method => $args) {
            
$this->addMethodCall($method$args);
        }

        return 
$this;
    }

    
/**
     * {@inheritdoc}
     */
    
public function resolve(bool $new false)
    {
        
$concrete $this->concrete;

        if (
$this->isShared() && $this->resolved !== null && $new === false) {
            return 
$this->resolved;
        }

        if (
is_callable($concrete)) {
            
$concrete $this->resolveCallable($concrete);
        }

        if (
$concrete instanceof RawArgumentInterface) {
            
$this->resolved $concrete->getValue();

            return 
$concrete->getValue();
        }

        if (
$concrete instanceof ClassNameInterface) {
            
$concrete $concrete->getClassName();
        }

        if (
is_string($concrete) && class_exists($concrete)) {
            
$concrete $this->resolveClass($concrete);
        }

        if (
is_object($concrete)) {
            
$concrete $this->invokeMethods($concrete);
        }

        
$this->resolved $concrete;

        return 
$concrete;
    }

    
/**
     * Resolve a callable.
     *
     * @param callable $concrete
     *
     * @return mixed
     */
    
protected function resolveCallable(callable $concrete)
    {
        
$resolved $this->resolveArguments($this->arguments);

        return 
call_user_func_array($concrete$resolved);
    }

    
/**
     * Resolve a class.
     *
     * @param string $concrete
     *
     * @return object
     *
     * @throws ReflectionException
     */
    
protected function resolveClass(string $concrete)
    {
        
$resolved   $this->resolveArguments($this->arguments);
        
$reflection = new ReflectionClass($concrete);

        return 
$reflection->newInstanceArgs($resolved);
    }

    
/**
     * Invoke methods on resolved instance.
     *
     * @param object $instance
     *
     * @return object
     */
    
protected function invokeMethods($instance)
    {
        foreach (
$this->methods as $method) {
            
$args $this->resolveArguments($method['arguments']);

            
/** @var callable $callable */
            
$callable = [$instance$method['method']];
            
call_user_func_array($callable$args);
        }

        return 
$instance;
    }
}

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