!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/qr.picotech.app/public_html_v3_3/vendor/mollie/mollie-api-php/src/Endpoints/   drwxr-xr-x
Free 24.84 GB of 117.98 GB (21.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Mollie\Api\Endpoints;

use 
Mollie\Api\Exceptions\ApiException;
use 
Mollie\Api\MollieApiClient;
use 
Mollie\Api\Resources\BaseCollection;
use 
Mollie\Api\Resources\BaseResource;
use 
Mollie\Api\Resources\ResourceFactory;

abstract class 
EndpointAbstract
{
    const 
REST_CREATE MollieApiClient::HTTP_POST;
    const 
REST_UPDATE MollieApiClient::HTTP_PATCH;
    const 
REST_READ MollieApiClient::HTTP_GET;
    const 
REST_LIST MollieApiClient::HTTP_GET;
    const 
REST_DELETE MollieApiClient::HTTP_DELETE;

    
/**
     * @var MollieApiClient
     */
    
protected $client;

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

    
/**
     * @var string|null
     */
    
protected $parentId;

    
/**
     * @param MollieApiClient $api
     */
    
public function __construct(MollieApiClient $api)
    {
        
$this->client $api;
    }

    
/**
     * @param array $filters
     * @return string
     */
    
protected function buildQueryString(array $filters)
    {
        if (empty(
$filters)) {
            return 
"";
        }

        foreach (
$filters as $key => $value) {
            if (
$value === true) {
                
$filters[$key] = "true";
            }

            if (
$value === false) {
                
$filters[$key] = "false";
            }
        }

        return 
"?" http_build_query($filters"""&");
    }

    
/**
     * @param array $body
     * @param array $filters
     * @return BaseResource
     * @throws ApiException
     */
    
protected function rest_create(array $body, array $filters)
    {
        
$result $this->client->performHttpCall(
            
self::REST_CREATE,
            
$this->getResourcePath() . $this->buildQueryString($filters),
            
$this->parseRequestBody($body)
        );

        return 
ResourceFactory::createFromApiResult($result$this->getResourceObject());
    }

    
/**
     * Sends a PATCH request to a single Molle API object.
     *
     * @param string $id
     * @param array $body
     *
     * @return BaseResource
     * @throws ApiException
     */
    
protected function rest_update($id, array $body = [])
    {
        if (empty(
$id)) {
            throw new 
ApiException("Invalid resource id.");
        }

        
$id urlencode($id);
        
$result $this->client->performHttpCall(
            
self::REST_UPDATE,
            
"{$this->getResourcePath()}/{$id}",
            
$this->parseRequestBody($body)
        );

        if (
$result === null) {
            return 
null;
        }

        return 
ResourceFactory::createFromApiResult($result$this->getResourceObject());
    }

    
/**
     * Retrieves a single object from the REST API.
     *
     * @param string $id Id of the object to retrieve.
     * @param array $filters
     * @return BaseResource
     * @throws ApiException
     */
    
protected function rest_read($id, array $filters)
    {
        if (empty(
$id)) {
            throw new 
ApiException("Invalid resource id.");
        }

        
$id urlencode($id);
        
$result $this->client->performHttpCall(
            
self::REST_READ,
            
"{$this->getResourcePath()}/{$id}$this->buildQueryString($filters)
        );

        return 
ResourceFactory::createFromApiResult($result$this->getResourceObject());
    }

    
/**
     * Sends a DELETE request to a single Molle API object.
     *
     * @param string $id
     * @param array $body
     *
     * @return BaseResource
     * @throws ApiException
     */
    
protected function rest_delete($id, array $body = [])
    {
        if (empty(
$id)) {
            throw new 
ApiException("Invalid resource id.");
        }

        
$id urlencode($id);
        
$result $this->client->performHttpCall(
            
self::REST_DELETE,
            
"{$this->getResourcePath()}/{$id}",
            
$this->parseRequestBody($body)
        );

        if (
$result === null) {
            return 
null;
        }

        return 
ResourceFactory::createFromApiResult($result$this->getResourceObject());
    }

    
/**
     * Get a collection of objects from the REST API.
     *
     * @param string $from The first resource ID you want to include in your list.
     * @param int $limit
     * @param array $filters
     *
     * @return BaseCollection
     * @throws ApiException
     */
    
protected function rest_list($from null$limit null, array $filters = [])
    {
        
$filters array_merge(["from" => $from"limit" => $limit], $filters);

        
$apiPath $this->getResourcePath() . $this->buildQueryString($filters);

        
$result $this->client->performHttpCall(self::REST_LIST$apiPath);

        
/** @var BaseCollection $collection */
        
$collection $this->getResourceCollectionObject($result->count$result->_links);

        foreach (
$result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) {
            
$collection[] = ResourceFactory::createFromApiResult($dataResult$this->getResourceObject());
        }

        return 
$collection;
    }

    
/**
     * Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
     *
     * @return BaseResource
     */
    
abstract protected function getResourceObject();

    
/**
     * @param string $resourcePath
     */
    
public function setResourcePath($resourcePath)
    {
        
$this->resourcePath strtolower($resourcePath);
    }

    
/**
     * @return string
     * @throws ApiException
     */
    
public function getResourcePath()
    {
        if (
strpos($this->resourcePath"_") !== false) {
            list(
$parentResource$childResource) = explode("_"$this->resourcePath2);

            if (empty(
$this->parentId)) {
                throw new 
ApiException("Subresource '{$this->resourcePath}' used without parent '$parentResource' ID.");
            }

            return 
"$parentResource/{$this->parentId}/$childResource";
        }

        return 
$this->resourcePath;
    }

    
/**
     * @param array $body
     * @return null|string
     * @throws ApiException
     */
    
protected function parseRequestBody(array $body)
    {
        if (empty(
$body)) {
            return 
null;
        }

        try {
            
$encoded = @json_encode($body);
        } catch (
\InvalidArgumentException $e) {
            throw new 
ApiException("Error encoding parameters into JSON: '".$e->getMessage()."'.");
        }

        return 
$encoded;
    }
}

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