!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Component/Templating/Loader/   drwxr-xr-x
Free 294.14 GB of 429.69 GB (68.45%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     FilesystemLoader.php (3.73 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\Templating\Loader;

use 
Symfony\Component\Templating\Storage\Storage;
use 
Symfony\Component\Templating\Storage\FileStorage;
use 
Symfony\Component\Templating\TemplateReferenceInterface;

/**
 * FilesystemLoader is a loader that read templates from the filesystem.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @api
 */
class FilesystemLoader extends Loader
{
    protected 
$templatePathPatterns;

    
/**
     * Constructor.
     *
     * @param array $templatePathPatterns An array of path patterns to look for templates
     *
     * @api
     */
    
public function __construct($templatePathPatterns)
    {
        
$this->templatePathPatterns = (array) $templatePathPatterns;
    }

    
/**
     * Loads a template.
     *
     * @param TemplateReferenceInterface $template A template
     *
     * @return Storage|Boolean false if the template cannot be loaded, a Storage instance otherwise
     *
     * @api
     */
    
public function load(TemplateReferenceInterface $template)
    {
        
$file $template->get('name');

        if (
self::isAbsolutePath($file) && is_file($file)) {
            return new 
FileStorage($file);
        }

        
$replacements = array();
        foreach (
$template->all() as $key => $value) {
            
$replacements['%'.$key.'%'] = $value;
        }

        
$logs = array();
        foreach (
$this->templatePathPatterns as $templatePathPattern) {
            if (
is_file($file strtr($templatePathPattern$replacements)) && is_readable($file)) {
                if (
null !== $this->logger) {
                    
$this->logger->debug(sprintf('Loaded template file "%s"'$file));
                } elseif (
null !== $this->debugger) {
                    
// just for BC, to be removed in 3.0
                    
$this->debugger->log(sprintf('Loaded template file "%s"'$file));
                }

                return new 
FileStorage($file);
            }

            if (
null !== $this->logger || null !== $this->debugger) {
                
$logs[] = sprintf('Failed loading template file "%s"'$file);
            }
        }

        foreach (
$logs as $log) {
            if (
null !== $this->logger) {
                
$this->logger->debug($log);
            } elseif (
null !== $this->debugger) {
                
$this->debugger->log($log);
            }
        }

        return 
false;
    }

    
/**
     * Returns true if the template is still fresh.
     *
     * @param TemplateReferenceInterface $template A template
     * @param integer                    $time     The last modification time of the cached template (timestamp)
     *
     * @return Boolean true if the template is still fresh, false otherwise
     *
     * @api
     */
    
public function isFresh(TemplateReferenceInterface $template$time)
    {
        if (
false === $storage $this->load($template)) {
            return 
false;
        }

        return 
filemtime((string) $storage) < $time;
    }

    
/**
     * Returns true if the file is an existing absolute path.
     *
     * @param string $file A path
     *
     * @return Boolean true if the path exists and is absolute, false otherwise
     */
    
protected static function isAbsolutePath($file)
    {
        if (
$file[0] == '/' || $file[0] == '\\'
            
|| (strlen($file) > && ctype_alpha($file[0])
                && 
$file[1] == ':'
                
&& ($file[2] == '\\' || $file[2] == '/')
            )
            || 
null !== parse_url($filePHP_URL_SCHEME)
        ) {
            return 
true;
        }

        return 
false;
    }
}

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0973 ]--