minor #2289 Remove debugging class (stof)

This PR was merged into the 2.x branch.

Discussion
----------

Remove debugging class

this file was added in the repo in the 2.x branch during an upstream merge of the 1.x branch. It clearly looks like a mistake.

Commits
-------

8206f44 Remove debugging class
This commit is contained in:
Fabien Potencier
2016-12-08 10:01:40 +01:00
-45
View File
@@ -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()
{
}
}