!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/Config/Builder/   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:     ClassBuilder.php (4.43 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\Config\Builder;

/**
 * Build PHP classes to generate config.
 *
 * @internal
 *
 * @author Tobias Nyholm <[email protected]>
 */
class ClassBuilder
{
    
/** @var string */
    
private $namespace;

    
/** @var string */
    
private $name;

    
/** @var Property[] */
    
private $properties = [];

    
/** @var Method[] */
    
private $methods = [];
    private 
$require = [];
    private 
$use = [];
    private 
$implements = [];
    private 
$allowExtraKeys false;

    public function 
__construct(string $namespacestring $name)
    {
        
$this->namespace $namespace;
        
$this->name ucfirst($this->camelCase($name)).'Config';
    }

    public function 
getDirectory(): string
    
{
        return 
str_replace('\\', \DIRECTORY_SEPARATOR$this->namespace);
    }

    public function 
getFilename(): string
    
{
        return 
$this->name.'.php';
    }

    public function 
build(): string
    
{
        
$rootPath explode(\DIRECTORY_SEPARATOR$this->getDirectory());
        
$require '';
        foreach (
$this->require as $class) {
            
// figure out relative path.
            
$path explode(\DIRECTORY_SEPARATOR$class->getDirectory());
            
$path[] = $class->getFilename();
            foreach (
$rootPath as $key => $value) {
                if (
$path[$key] !== $value) {
                    break;
                }
                unset(
$path[$key]);
            }
            
$require .= sprintf('require_once __DIR__.\DIRECTORY_SEPARATOR.\'%s\';'implode('\'.\DIRECTORY_SEPARATOR.\''$path))."\n";
        }
        
$use '';
        foreach (
array_keys($this->use) as $statement) {
            
$use .= sprintf('use %s;'$statement)."\n";
        }

        
$implements = [] === $this->implements '' 'implements '.implode(', '$this->implements);
        
$body '';
        foreach (
$this->properties as $property) {
            
$body .= '    '.$property->getContent()."\n";
        }
        foreach (
$this->methods as $method) {
            
$lines explode("\n"$method->getContent());
            foreach (
$lines as $line) {
                
$body .= '    '.$line."\n";
            }
        }

        
$content strtr('<?php

namespace NAMESPACE;

REQUIRE
USE

/**
 * This class is automatically generated to help creating config.
 */
class CLASS IMPLEMENTS
{
BODY
}
'
, ['NAMESPACE' => $this->namespace'REQUIRE' => $require'USE' => $use'CLASS' => $this->getName(), 'IMPLEMENTS' => $implements'BODY' => $body]);

        return 
$content;
    }

    public function 
addRequire(self $class): void
    
{
        
$this->require[] = $class;
    }

    public function 
addUse(string $class): void
    
{
        
$this->use[$class] = true;
    }

    public function 
addImplements(string $interface): void
    
{
        
$this->implements[] = '\\'.ltrim($interface'\\');
    }

    public function 
addMethod(string $namestring $body, array $params = []): void
    
{
        
$this->methods[] = new Method(strtr($body, ['NAME' => $this->camelCase($name)] + $params));
    }

    public function 
addProperty(string $namestring $classType null): Property
    
{
        
$property = new Property($name'_' !== $name[0] ? $this->camelCase($name) : $name);
        if (
null !== $classType) {
            
$property->setType($classType);
        }
        
$this->properties[] = $property;
        
$property->setContent(sprintf('private $%s;'$property->getName()));

        return 
$property;
    }

    public function 
getProperties(): array
    {
        return 
$this->properties;
    }

    private function 
camelCase(string $input): string
    
{
        
$output lcfirst(str_replace(' '''ucwords(str_replace('_'' '$input))));

        return 
preg_replace('#\W#'''$output);
    }

    public function 
getName(): string
    
{
        return 
$this->name;
    }

    public function 
getNamespace(): string
    
{
        return 
$this->namespace;
    }

    public function 
getFqcn(): string
    
{
        return 
'\\'.$this->namespace.'\\'.$this->name;
    }

    public function 
setAllowExtraKeys(bool $allowExtraKeys): void
    
{
        
$this->allowExtraKeys $allowExtraKeys;
    }

    public function 
shouldAllowExtraKeys(): bool
    
{
        return 
$this->allowExtraKeys;
    }
}

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