public function resolver($name = null)
    {
        if (null === $this->__templateResolver) {
            $this->setResolver(new TemplatePathStack());
        }

        if (null !== $name) {
        	$viewPath = $this->__templateResolver->resolve($name, $this);
        	//echo $viewPath. "<br>";
            return $this->__templateResolver->resolve($name, $this);
        }

        return $this->__templateResolver;
    }