public function getTemplatePath($namespace)
    {
        if (!$this->hasTemplatePath($namespace)) {
            throw new \RuntimeException("Path with namespace \"".$namespace."\" is not exist");
        }

        $path = $this->paths[$namespace];

        if (!is_dir($path)) {
            throw new \RuntimeException("Invalid template path with namespace \"".$namespace."\"");
        }

        return $path;
    }