public function add_template_directory($directory, $namespace = null) {
		if ($this->filesystem_loader === null) {
			$this->filesystem_loader = new \Twig_Loader_Filesystem($directory);
		}

		if ($namespace === null) {
			$this->filesystem_loader->addPath($directory);
		} else {
			$this->filesystem_loader->addPath($directory, $namespace);
		}
	}