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

/home/picotech/domains/sms.picotech.app/public_html/vendor/vonage/client-core/src/Client/Factory/   drwxr-xr-x
Free 28.63 GB of 117.98 GB (24.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
Vonage\Client\Factory;

use 
Psr\Container\ContainerInterface;
use 
Psr\Log\LoggerInterface;
use 
RuntimeException;
use 
Vonage\Client;
use 
Vonage\Logger\LoggerAwareInterface;

use function 
is_callable;
use function 
sprintf;

class 
MapFactory implements FactoryInterfaceContainerInterface
{
    
/**
     * Map of instances.
     *
     * @var array
     */
    
protected $cache = [];

    
/**
     * @param mixed[] $map
     */
    
public function __construct(
        
/**
         * Map of api namespaces to classes.
         */
        
protected $map,
        
/**
         * Vonage Client
         */
        
protected Client $client
    
) {
    }

    
/**
     * @param string $id
     *
     * @noinspection PhpMissingParamTypeInspection
     */
    
public function has($id): bool
    
{
        return isset(
$this->map[$id]);
    }

    
/**
     * @deprecated Use has() instead
     */
    
public function hasApi(string $api): bool
    
{
        return 
$this->has($api);
    }

    
/**
     * @param string $id
     *
     * @noinspection PhpMissingParamTypeInspection
     */
    
public function get($id)
    {
        if (isset(
$this->cache[$id])) {
            return 
$this->cache[$id];
        }

        
$instance $this->make($id);
        
$this->cache[$id] = $instance;

        return 
$instance;
    }

    public function 
getClient(): Client
    
{
        return 
$this->client;
    }

    
/**
     * @deprecated Use get() instead
     */
    
public function getApi(string $api)
    {
        return 
$this->get($api);
    }

    public function 
make($key)
    {
        if (!
$this->has($key)) {
            throw new 
RuntimeException(
                
sprintf(
                    
'no map defined for `%s`',
                    
$key
                
)
            );
        }

        if (
is_callable($this->map[$key])) {
            
$instance $this->map[$key]($this);
        } else {
            
$class $this->map[$key];
            
$instance = new $class();
            if (
is_callable($instance)) {
                
$instance $instance($this);
            }
        }

        if (
$instance instanceof Client\ClientAwareInterface) {
            
$instance->setClient($this->client);
        }

        if (
$instance instanceof LoggerAwareInterface && $this->has(LoggerInterface::class)) {
            
$instance->setLogger($this->get(LoggerInterface::class));
        }

        return 
$instance;
    }

    public function 
set($key$value): void
    
{
        
$this->map[$key] = $value;
        if (!
is_callable($value)) {
            
$this->cache[$key] = $value;
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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