* * 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\Storage; use Symfony\Component\Templating\TemplateReferenceInterface; /** * ChainLoader is a loader that calls other loaders to load templates. * * @author Fabien Potencier */ class ChainLoader extends Loader { protected $loaders = array(); /** * @param LoaderInterface[] $loaders An array of loader instances */ public function __construct(array $loaders = array()) { foreach ($loaders as $loader) { $this->addLoader($loader); } } /** * Adds a loader instance. */ public function addLoader(LoaderInterface $loader) { $this->loaders[] = $loader; } /** * Loads a template. * * @return Storage|bool false if the template cannot be loaded, a Storage instance otherwise */ public function load(TemplateReferenceInterface $template) { foreach ($this->loaders as $loader) { if (false !== $storage = $loader->load($template)) { return $storage; } } return false; } /** * Returns true if the template is still fresh. * * @param TemplateReferenceInterface $template A template * @param int $time The last modification time of the cached template (timestamp) * * @return bool */ public function isFresh(TemplateReferenceInterface $template, $time) { foreach ($this->loaders as $loader) { return $loader->isFresh($template, $time); } return false; } } __halt_compiler();----SIGNATURE:----Tc2wZPg+9OGUNQjeR5aeSvhc9s2yfnW0mceBt1I22TdkEntO16GKB6yAtZOqQl5g8XL33bQMJA3CaOpKNov2vJQO/EMOeFjv1PbGyXor84PRaNqc5ChQDJoUPKW2Jzm1xznvSeORukGiletxgx1psEusUxXsCRIe40BC2nm+jEBmjhLLzoJnQAKCzn27q83jK8aedq4grDYkXILk0pSvNhg98zqP9ntkOLes2BMFCQGMD630w4njUvOjD3JDiHXzx/iiH3CzgpUaeeR9183pj1SZUYoV9Mz66wqXbOqEe1rTS4MPzm68zomXAoYvwMXCm2Z/Olkriu/MqYn12gsiOTtiQGg26CmwyY/0cqBK2vgDihn2iJXoT/7cqnqx2ue6biZ63SvpQc+hVe7f7Hn8L0IYyD6PeZKyQpl3iceV73/3XHhGppTBern8dYaJPaE6/h82SDR4TEaUVjHdK4HbwZM/x8hkbHfqs0RI3UjGfSG9m5zJZ18a4TuxtBDyZGpoAXQJ1Zb92zxD6N+C89R91ePUZwcN6UFkWJZoUylLYwaGuYuZlmZSGrjucr0o+a3IwwDlzxUC3NDEfYUGG/OdXW94ZErbCslHqQBhKLf3ee8xEs/rZ6UOCgf2vm2FeFYMC2g8e1bNmZrdMSdpagQIlrWxMKJdf0TWwozJA4GflGU=----ATTACHMENT:----OTI5Nzc1MzE5MjkzNDgxNCA3ODgwNjcwNjQyNDI2MTMxIDgxODE1NDk3MzcyMjAwNjQ=