/** * @return mixed */ public function resolve($path) { if (file_exists($path)) { return new PHPTAL_FileSource($path); } $path = $this->zendResolver->resolve($path); if (file_exists($path)) { return new PHPTAL_FileSource($path); } return null; }
/** * Retrieve template name or template resolver * * @param null|string $name * @return string|Resolver */ public function resolver($name = null) { if (null === $this->templateResolver) { $this->setResolver(new Resolver\TemplatePathStack()); } if (null !== $name) { return $this->templateResolver->resolve($name, $this); } return $this->templateResolver; }
/** * Retrieve template name or template resolver * * @param null|string $name * @return string|Resolver */ public function resolver($name = null) { if (null === $this->__templateResolver) { throw new \Exception("No SourceResolver registered"); //$this->setResolver(new Resolver\TemplatePathStack()); } if (null !== $name) { return $this->__templateResolver->resolve($name, $this); } return $this->__templateResolver; }