Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/pallets/vendor/symfony-cmf/routing/src/Enhancer/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/pallets/vendor/symfony-cmf/routing/src/Enhancer/FieldMapEnhancer.php

<?php

/*
 * This file is part of the Symfony CMF package.
 *
 * (c) Symfony CMF
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Cmf\Component\Routing\Enhancer;

use Symfony\Component\HttpFoundation\Request;

/**
 * This enhancer can fill one field with the result of a hashmap lookup of
 * another field. If the target field is already set, it does nothing.
 *
 * @author David Buchmann
 */
class FieldMapEnhancer implements RouteEnhancerInterface
{
    /**
     * @var string field for key in hashmap lookup
     */
    protected $source;

    /**
     * @var string field to write hashmap lookup result into
     */
    protected $target;

    /**
     * @var array containing the mapping between the source field value and target field value
     */
    protected $hashmap;

    /**
     * @param string $source  the field to read
     * @param string $target  the field to write the result of the lookup into
     * @param array  $hashmap for looking up value from source and get value for target
     */
    public function __construct($source, $target, array $hashmap)
    {
        $this->source = $source;
        $this->target = $target;
        $this->hashmap = $hashmap;
    }

    /**
     * If the target field is not set but the source field is, map the field.
     *
     * {@inheritdoc}
     */
    public function enhance(array $defaults, Request $request)
    {
        if (array_key_exists($this->target, $defaults)
            || !array_key_exists($this->source, $defaults)
            || !array_key_exists($defaults[$this->source], $this->hashmap)
        ) {
            return $defaults;
        }

        $defaults[$this->target] = $this->hashmap[$defaults[$this->source]];

        return $defaults;
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net