mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
Remove debugging class
This commit is contained in:
committed by
GitHub
parent
fbbdeb53a7
commit
8206f446f8
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
* (c) 2015 Fabien Potencier
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Twig_TemplateIterator implements IteratorAggregate
|
||||
{
|
||||
private $loader;
|
||||
|
||||
public function __construct(Twig_LoaderInterface $loader)
|
||||
{
|
||||
$this->loader = $loader;
|
||||
|
||||
$templates = array();
|
||||
if ($loader instanceof Twig_Loader_Filesystem) {
|
||||
foreach ($loader->getNamespaces() as $namespace) {
|
||||
$paths = $loader->getPaths($namespace);
|
||||
foreach ($paths as $path) {
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath($path)), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
|
||||
if (Twig_Loader_Filesystem::MAIN_NAMESPACE === $namespace) {
|
||||
$templates[] = substr($file->getPathname(), strlen($path) + 1);
|
||||
} else {
|
||||
$templates[] = '@'.$namespace.'/'.$file->getPathname();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print_r($templates);
|
||||
}
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user