Adds a path where templates are stored.
string $path A path where to look for templates:
string $namespace A path name:
public function addPath($path, $namespace = '__main__') {
// invalidate the cache
$this->cache = array();
if (!is_dir($path)) {
throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path));
}
$this->paths[$namespace][] = rtrim($path, '/\\');
}