!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

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

Safe-mode: OFF (not secure)

/uploads/script/vendor/symfony/console/DependencyInjection/   drwxr-xr-x
Free 13.42 GB of 57.97 GB (23.15%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AddConsoleCommandPass.php (3.92 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\Console\DependencyInjection;

use 
Symfony\Component\Console\Command\Command;
use 
Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
use 
Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use 
Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
use 
Symfony\Component\DependencyInjection\ContainerBuilder;
use 
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use 
Symfony\Component\DependencyInjection\TypedReference;

/**
 * Registers console commands.
 *
 * @author GrĂ©goire Pineau <lyrixx@lyrixx.info>
 */
class AddConsoleCommandPass implements CompilerPassInterface
{
    private 
$commandLoaderServiceId;
    private 
$commandTag;
    private 
$noPreloadTag;
    private 
$privateTagName;

    public function 
__construct(string $commandLoaderServiceId 'console.command_loader'string $commandTag 'console.command'string $noPreloadTag 'container.no_preload'string $privateTagName 'container.private')
    {
        
$this->commandLoaderServiceId $commandLoaderServiceId;
        
$this->commandTag $commandTag;
        
$this->noPreloadTag $noPreloadTag;
        
$this->privateTagName $privateTagName;
    }

    public function 
process(ContainerBuilder $container)
    {
        
$commandServices $container->findTaggedServiceIds($this->commandTagtrue);
        
$lazyCommandMap = [];
        
$lazyCommandRefs = [];
        
$serviceIds = [];

        foreach (
$commandServices as $id => $tags) {
            
$definition $container->getDefinition($id);
            
$definition->addTag($this->noPreloadTag);
            
$class $container->getParameterBag()->resolveValue($definition->getClass());

            if (isset(
$tags[0]['command'])) {
                
$commandName $tags[0]['command'];
            } else {
                if (!
$r $container->getReflectionClass($class)) {
                    throw new 
InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.'$class$id));
                }
                if (!
$r->isSubclassOf(Command::class)) {
                    throw new 
InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".'$id$this->commandTagCommand::class));
                }
                
$commandName $class::getDefaultName();
            }

            if (
null === $commandName) {
                if (!
$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) {
                    
$commandId 'console.command.public_alias.'.$id;
                    
$container->setAlias($commandId$id)->setPublic(true);
                    
$id $commandId;
                }
                
$serviceIds[] = $id;

                continue;
            }

            unset(
$tags[0]);
            
$lazyCommandMap[$commandName] = $id;
            
$lazyCommandRefs[$id] = new TypedReference($id$class);
            
$aliases = [];

            foreach (
$tags as $tag) {
                if (isset(
$tag['command'])) {
                    
$aliases[] = $tag['command'];
                    
$lazyCommandMap[$tag['command']] = $id;
                }
            }

            
$definition->addMethodCall('setName', [$commandName]);

            if (
$aliases) {
                
$definition->addMethodCall('setAliases', [$aliases]);
            }
        }

        
$container
            
->register($this->commandLoaderServiceIdContainerCommandLoader::class)
            ->
setPublic(true)
            ->
addTag($this->noPreloadTag)
            ->
setArguments([ServiceLocatorTagPass::register($container$lazyCommandRefs), $lazyCommandMap]);

        
$container->setParameter('console.command.ids'$serviceIds);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0081 ]--