__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/*
* This file is part of Mustache.php.
*
* (c) 2010-2017 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Mustache class autoloader.
*/
class Mustache_Autoloader
{
private $baseDir;
/**
* An array where the key is the baseDir and the key is an instance of this
* class.
*
* @var array
*/
private static $instances;
/**
* Autoloader constructor.
*
* @param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..')
*/
public function __construct($baseDir = null)
{
if ($baseDir === null) {
$baseDir = dirname(__FILE__) . '/..';
}
// realpath doesn't always work, for example, with stream URIs
$realDir = realpath($baseDir);
if (is_dir($realDir)) {
$this->baseDir = $realDir;
} else {
$this->baseDir = $baseDir;
}
}
/**
* Register a new instance as an SPL autoloader.
*
* @param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..')
*
* @return Mustache_Autoloader Registered Autoloader instance
*/
public static function register($baseDir = null)
{
$key = $baseDir ? $baseDir : 0;
if (!isset(self::$instances[$key])) {
self::$instances[$key] = new self($baseDir);
}
$loader = self::$instances[$key];
spl_autoload_register(array($loader, 'autoload'));
return $loader;
}
/**
* Autoload Mustache classes.
*
* @param string $class
*/
public function autoload($class)
{
if ($class[0] === '\\') {
$class = substr($class, 1);
}
if (strpos($class, 'Mustache') !== 0) {
return;
}
$file = sprintf('%s/%s.php', $this->baseDir, str_replace('_', '/', $class));
if (is_file($file)) {
require $file;
}
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Cache | Folder | 0777 |
|
|
| Exception | Folder | 0777 |
|
|
| Loader | Folder | 0777 |
|
|
| Logger | Folder | 0777 |
|
|
| Source | Folder | 0777 |
|
|
| Autoloader.php | File | 2.02 KB | 0777 |
|
| Cache.php | File | 930 B | 0777 |
|
| Compiler.php | File | 22.98 KB | 0777 |
|
| Context.php | File | 6.74 KB | 0777 |
|
| Engine.php | File | 25.7 KB | 0777 |
|
| Exception.php | File | 338 B | 0777 |
|
| HelperCollection.php | File | 3.66 KB | 0777 |
|
| LambdaHelper.php | File | 1.96 KB | 0777 |
|
| Loader.php | File | 578 B | 0777 |
|
| Logger.php | File | 3.29 KB | 0777 |
|
| Parser.php | File | 10.65 KB | 0777 |
|
| Source.php | File | 1.03 KB | 0777 |
|
| Template.php | File | 4.89 KB | 0777 |
|
| Tokenizer.php | File | 12.28 KB | 0777 |
|