*/
class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
{
- protected $templates;
+ protected $templates = array();
/**
* Constructor.
*/
public function __construct(array $templates)
{
- $this->templates = array();
- foreach ($templates as $name => $template) {
- $this->templates[$name] = $template;
- }
+ $this->templates = $templates;
}
/**
class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
{
private $hasSourceCache = array();
- protected $loaders;
+ protected $loaders = array();
/**
* Constructor.
*/
public function __construct(array $loaders = array())
{
- $this->loaders = array();
foreach ($loaders as $loader) {
$this->addLoader($loader);
}
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
- protected $paths;
- protected $cache;
+ protected $paths = array();
+ protected $cache = array();
/**
* Constructor.