4 * This file is part of Twig.
6 * (c) 2009 Fabien Potencier
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
13 * Loads a template from a string.
15 * This loader should only be used for unit testing as it has many limitations
16 * (for instance, the include or extends tag does not make any sense for a string
19 * When using this loader with a cache mechanism, you should know that a new cache
20 * key is generated each time a template content "changes" (the cache key being the
21 * source code of the template). If you don't want to see your cache grows out of
22 * control, you need to take care of clearing the old cache file by yourself.
24 * @author Fabien Potencier <fabien@symfony.com>
26 class Twig_Loader_String
implements Twig_LoaderInterface
, Twig_ExistsLoaderInterface
31 public function getSource($name)
39 public function exists($name)
47 public function getCacheKey($name)
55 public function isFresh($name, $time)