!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/php/Symfony/Component/DependencyInjection/Compiler/   drwxr-xr-x
Free 83.26 GB of 96.73 GB (86.07%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

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

namespace Symfony\Component\DependencyInjection\Compiler;

use 
Symfony\Component\DependencyInjection\Alias;
use 
Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use 
Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
use 
Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
use 
Symfony\Component\DependencyInjection\ContainerBuilder;
use 
Symfony\Component\DependencyInjection\Definition;
use 
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use 
Symfony\Component\DependencyInjection\Reference;
use 
Symfony\Component\DependencyInjection\ServiceLocator;

/**
 * Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances.
 *
 * @author Nicolas Grekas <[email protected]>
 */
final class ServiceLocatorTagPass extends AbstractRecursivePass
{
    use 
PriorityTaggedServiceTrait;

    protected function 
processValue($valuebool $isRoot false)
    {
        if (
$value instanceof ServiceLocatorArgument) {
            if (
$value->getTaggedIteratorArgument()) {
                
$value->setValues($this->findAndSortTaggedServices($value->getTaggedIteratorArgument(), $this->container));
            }

            return 
self::register($this->container$value->getValues());
        }

        if (!
$value instanceof Definition || !$value->hasTag('container.service_locator')) {
            return 
parent::processValue($value$isRoot);
        }

        if (!
$value->getClass()) {
            
$value->setClass(ServiceLocator::class);
        }

        
$services $value->getArguments()[0] ?? null;

        if (
$services instanceof TaggedIteratorArgument) {
            
$services $this->findAndSortTaggedServices($services$this->container);
        }

        if (!\
is_array($services)) {
            throw new 
InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.'$this->currentId));
        }

        
$i 0;

        foreach (
$services as $k => $v) {
            if (
$v instanceof ServiceClosureArgument) {
                continue;
            }
            if (!
$v instanceof Reference) {
                throw new 
InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".'$this->currentIdget_debug_type($v), $k));
            }

            if (
$i === $k) {
                unset(
$services[$k]);

                
$k = (string) $v;
                ++
$i;
            } elseif (\
is_int($k)) {
                
$i null;
            }
            
$services[$k] = new ServiceClosureArgument($v);
        }
        
ksort($services);

        
$value->setArgument(0$services);

        
$id '.service_locator.'.ContainerBuilder::hash($value);

        if (
$isRoot) {
            if (
$id !== $this->currentId) {
                
$this->container->setAlias($id, new Alias($this->currentIdfalse));
            }

            return 
$value;
        }

        
$this->container->setDefinition($id$value->setPublic(false));

        return new 
Reference($id);
    }

    
/**
     * @param Reference[] $refMap
     */
    
public static function register(ContainerBuilder $container, array $refMapstring $callerId null): Reference
    
{
        foreach (
$refMap as $id => $ref) {
            if (!
$ref instanceof Reference) {
                throw new 
InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.'get_debug_type($ref), $id));
            }
            
$refMap[$id] = new ServiceClosureArgument($ref);
        }

        
$locator = (new Definition(ServiceLocator::class))
            ->
addArgument($refMap)
            ->
addTag('container.service_locator');

        if (
null !== $callerId && $container->hasDefinition($callerId)) {
            
$locator->setBindings($container->getDefinition($callerId)->getBindings());
        }

        if (!
$container->hasDefinition($id '.service_locator.'.ContainerBuilder::hash($locator))) {
            
$container->setDefinition($id$locator);
        }

        if (
null !== $callerId) {
            
$locatorId $id;
            
// Locators are shared when they hold the exact same list of factories;
            // to have them specialized per consumer service, we use a cloning factory
            // to derivate customized instances from the prototype one.
            
$container->register($id .= '.'.$callerIdServiceLocator::class)
                ->
setFactory([new Reference($locatorId), 'withContext'])
                ->
addTag('container.service_locator_context', ['id' => $callerId])
                ->
addArgument($callerId)
                ->
addArgument(new Reference('service_container'));
        }

        return new 
Reference($id);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0045 ]--