ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
symfony
/
templating
/
Loader
/
Viewing: CacheLoader.php
<?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\FileStorage; use Symfony\Component\Templating\TemplateReferenceInterface; /** * CacheLoader is a loader that caches other loaders responses * on the filesystem. * * This cache only caches on disk to allow PHP accelerators to cache the opcodes. * All other mechanism would imply the use of `eval()`. * * @author Fabien Potencier <fabien@symfony.com> */ class CacheLoader extends Loader { protected $loader; protected $dir; /** * @param string $dir The directory where to store the cache files */ public function __construct(LoaderInterface $loader, string $dir) { $this->loader = $loader; $this->dir = $dir; } /** * {@inheritdoc} */ public function load(TemplateReferenceInterface $template) { $key = hash('sha256', $template->getLogicalName()); $dir = $this->dir.\DIRECTORY_SEPARATOR.substr($key, 0, 2); $file = substr($key, 2).'.tpl'; $path = $dir.\DIRECTORY_SEPARATOR.$file; if (is_file($path)) { if (null !== $this->logger) { $this->logger->debug('Fetching template from cache.', ['name' => $template->get('name')]); } return new FileStorage($path); } if (false === $storage = $this->loader->load($template)) { return false; } $content = $storage->getContent(); if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) { throw new \RuntimeException(sprintf('Cache Loader was not able to create directory "%s".', $dir)); } file_put_contents($path, $content); if (null !== $this->logger) { $this->logger->debug('Storing template in cache.', ['name' => $template->get('name')]); } return new FileStorage($path); } /** * {@inheritdoc} */ public function isFresh(TemplateReferenceInterface $template, int $time) { return $this->loader->isFresh($template, $time); } }
Coded With 💗 by
0x6ick