private function getTemplatePath($name)
    {
        if (strpos($name, '::') !== false) {
            $parts = explode('::', $name);
            $ns = array_shift($parts);

            if (isset($this->manager->namespaces[$ns])) {
                $path = $this->manager->namespaces[$ns] . '/' . join('/', $parts) . $this->manager->filesExtension;
            } else {
                throw new LogicException(sprintf("Template namespace '%s::' not defined", $ns));
            }
        } else {
            $path = $this->manager->defaultDirectory . '/' . $name . $this->manager->filesExtension;
        }

        if (file_exists($path)) {
            return $path;
        }

        throw new LogicException(sprintf("Template file '%s' not found", $path));
    }