!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/phpmyadmin/vendor/symfony/dependency-injection/Compiler/   drwxr-xr-x
Free 11.56 GB of 61.93 GB (18.66%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RegisterServiceSubscribersPass.php (6.5 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\DependencyInjection\Compiler;

use 
Psr\Container\ContainerInterface as PsrContainerInterface;
use 
Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use 
Symfony\Component\DependencyInjection\Argument\BoundArgument;
use 
Symfony\Component\DependencyInjection\ContainerInterface;
use 
Symfony\Component\DependencyInjection\Definition;
use 
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use 
Symfony\Component\DependencyInjection\Reference;
use 
Symfony\Component\DependencyInjection\TypedReference;
use 
Symfony\Component\HttpFoundation\Session\SessionInterface;
use 
Symfony\Contracts\Service\ServiceProviderInterface;
use 
Symfony\Contracts\Service\ServiceSubscriberInterface;

/**
 * Compiler pass to register tagged services that require a service locator.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 */
class RegisterServiceSubscribersPass extends AbstractRecursivePass
{
    protected function 
processValue($valuebool $isRoot false)
    {
        if (!
$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) {
            return 
parent::processValue($value$isRoot);
        }

        
$serviceMap = [];
        
$autowire $value->isAutowired();

        foreach (
$value->getTag('container.service_subscriber') as $attributes) {
            if (!
$attributes) {
                
$autowire true;
                continue;
            }
            
ksort($attributes);
            if ([] !== 
array_diff(array_keys($attributes), ['id''key'])) {
                throw new 
InvalidArgumentException(sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".'implode('", "'array_keys($attributes)), $this->currentId));
            }
            if (!\
array_key_exists('id'$attributes)) {
                throw new 
InvalidArgumentException(sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".'$attributes['key'], $this->currentId));
            }
            if (!\
array_key_exists('key'$attributes)) {
                
$attributes['key'] = $attributes['id'];
            }
            if (isset(
$serviceMap[$attributes['key']])) {
                continue;
            }
            
$serviceMap[$attributes['key']] = new Reference($attributes['id']);
        }
        
$class $value->getClass();

        if (!
$r $this->container->getReflectionClass($class)) {
            throw new 
InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.'$class$this->currentId));
        }
        if (!
$r->isSubclassOf(ServiceSubscriberInterface::class)) {
            throw new 
InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".'$this->currentIdServiceSubscriberInterface::class));
        }
        
$class $r->name;
        
$replaceDeprecatedSession $this->container->has('.session.deprecated') && $r->isSubclassOf(AbstractController::class);
        
$subscriberMap = [];

        foreach (
$class::getSubscribedServices() as $key => $type) {
            if (!\
is_string($type) || !preg_match('/(?(DEFINE)(?<cn>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))(?(DEFINE)(?<fqcn>(?&cn)(?:\\\\(?&cn))*+))^\??(?&fqcn)(?:(?:\|(?&fqcn))*+|(?:&(?&fqcn))*+)$/'$type)) {
                throw new 
InvalidArgumentException(sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.'$class$this->currentId$key, \is_string($type) ? $type get_debug_type($type)));
            }
            if (
$optionalBehavior '?' === $type[0]) {
                
$type substr($type1);
                
$optionalBehavior ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
            }
            if (\
is_int($name $key)) {
                
$key $type;
                
$name null;
            }
            if (!isset(
$serviceMap[$key])) {
                if (!
$autowire) {
                    throw new 
InvalidArgumentException(sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".'$this->currentId$key$class));
                }
                if (
$replaceDeprecatedSession && SessionInterface::class === $type) {
                    
// This prevents triggering the deprecation when building the container
                    // Should be removed in Symfony 6.0
                    
$type '.session.deprecated';
                }
                
$serviceMap[$key] = new Reference($type);
            }

            if (
$name) {
                if (
false !== $i strpos($name'::get')) {
                    
$name lcfirst(substr($name$i));
                } elseif (
str_contains($name'::')) {
                    
$name null;
                }
            }

            if (
null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) {
                
$camelCaseName lcfirst(str_replace(' '''ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/'' '$name))));
                
$name $this->container->has($type.' $'.$camelCaseName) ? $camelCaseName $name;
            }

            
$subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type$optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE$name);
            unset(
$serviceMap[$key]);
        }

        if (
$serviceMap array_keys($serviceMap)) {
            
$message sprintf(< \count($serviceMap) ? 'keys "%s" do' 'key "%s" does'str_replace('%''%%'implode('", "'$serviceMap)));
            throw new 
InvalidArgumentException(sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".'$message$class$this->currentId));
        }

        
$locatorRef ServiceLocatorTagPass::register($this->container$subscriberMap$this->currentId);

        
$value->addTag('container.service_subscriber.locator', ['id' => (string) $locatorRef]);

        
$value->setBindings([
            
PsrContainerInterface::class => new BoundArgument($locatorReffalse),
            
ServiceProviderInterface::class => new BoundArgument($locatorReffalse),
        ] + 
$value->getBindings());

        return 
parent::processValue($value);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.8755 ]--