!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/nikic/php-parser/lib/PhpParser/Builder/   drwxr-xr-x
Free 13.3 GB of 57.97 GB (22.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TraitUseAdaptation.php (4.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

namespace 
PhpParser\Builder;

use 
PhpParser\Builder;
use 
PhpParser\BuilderHelpers;
use 
PhpParser\Node;
use 
PhpParser\Node\Stmt;

class 
TraitUseAdaptation implements Builder
{
    const 
TYPE_UNDEFINED  0;
    const 
TYPE_ALIAS      1;
    const 
TYPE_PRECEDENCE 2;

    
/** @var int Type of building adaptation */
    
protected $type;

    protected 
$trait;
    protected 
$method;

    protected 
$modifier null;
    protected 
$alias null;

    protected 
$insteadof = [];

    
/**
     * Creates a trait use adaptation builder.
     *
     * @param Node\Name|string|null  $trait  Name of adaptated trait
     * @param Node\Identifier|string $method Name of adaptated method
     */
    
public function __construct($trait$method) {
        
$this->type self::TYPE_UNDEFINED;

        
$this->trait is_null($trait)? nullBuilderHelpers::normalizeName($trait);
        
$this->method BuilderHelpers::normalizeIdentifier($method);
    }

    
/**
     * Sets alias of method.
     *
     * @param Node\Identifier|string $alias Alias for adaptated method
     *
     * @return $this The builder instance (for fluid interface)
     */
    
public function as($alias) {
        if (
$this->type === self::TYPE_UNDEFINED) {
            
$this->type self::TYPE_ALIAS;
        }

        if (
$this->type !== self::TYPE_ALIAS) {
            throw new 
\LogicException('Cannot set alias for not alias adaptation buider');
        }

        
$this->alias $alias;
        return 
$this;
    }

    
/**
     * Sets adaptated method public.
     *
     * @return $this The builder instance (for fluid interface)
     */
    
public function makePublic() {
        
$this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
        return 
$this;
    }

    
/**
     * Sets adaptated method protected.
     *
     * @return $this The builder instance (for fluid interface)
     */
    
public function makeProtected() {
        
$this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
        return 
$this;
    }

    
/**
     * Sets adaptated method private.
     *
     * @return $this The builder instance (for fluid interface)
     */
    
public function makePrivate() {
        
$this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
        return 
$this;
    }

    
/**
     * Adds overwritten traits.
     *
     * @param Node\Name|string ...$traits Traits for overwrite
     *
     * @return $this The builder instance (for fluid interface)
     */
    
public function insteadof(...$traits) {
        if (
$this->type === self::TYPE_UNDEFINED) {
            if (
is_null($this->trait)) {
                throw new 
\LogicException('Precedence adaptation must have trait');
            }

            
$this->type self::TYPE_PRECEDENCE;
        }

        if (
$this->type !== self::TYPE_PRECEDENCE) {
            throw new 
\LogicException('Cannot add overwritten traits for not precedence adaptation buider');
        }

        foreach (
$traits as $trait) {
            
$this->insteadof[] = BuilderHelpers::normalizeName($trait);
        }

        return 
$this;
    }

    protected function 
setModifier(int $modifier) {
        if (
$this->type === self::TYPE_UNDEFINED) {
            
$this->type self::TYPE_ALIAS;
        }

        if (
$this->type !== self::TYPE_ALIAS) {
            throw new 
\LogicException('Cannot set access modifier for not alias adaptation buider');
        }

        if (
is_null($this->modifier)) {
            
$this->modifier $modifier;
        } else {
            throw new 
\LogicException('Multiple access type modifiers are not allowed');
        }
    }

    
/**
     * Returns the built node.
     *
     * @return Node The built node
     */
    
public function getNode() : Node {
        switch (
$this->type) {
            case 
self::TYPE_ALIAS:
                return new 
Stmt\TraitUseAdaptation\Alias($this->trait$this->method$this->modifier$this->alias);
            case 
self::TYPE_PRECEDENCE:
                return new 
Stmt\TraitUseAdaptation\Precedence($this->trait$this->method$this->insteadof);
            default:
                throw new 
\LogicException('Type of adaptation is not defined');
        }
    }
}

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