Example #1
0
 /**
  * Check if template exists
  * @param string $template
  * @return bool
  */
 public function templateExists($template)
 {
     if ($provider = strstr($template, ":", true)) {
         if (isset($this->_providers[$provider])) {
             return $this->_providers[$provider]->templateExists(substr($template, strlen($provider) + 1));
         }
     } else {
         return $this->_provider->templateExists($template);
     }
     return false;
 }
Example #2
0
 /**
  * Check if template exists
  * @param string $template
  * @return bool
  */
 public function templateExists($template)
 {
     $key = $this->_options . "@" . $template;
     if (isset($this->_storage[$key])) {
         // already loaded
         return true;
     }
     if ($provider = strstr($template, ":", true)) {
         if (isset($this->_providers[$provider])) {
             return $this->_providers[$provider]->templateExists(substr($template, strlen($provider) + 1));
         }
     } else {
         return $this->_provider->templateExists($template);
     }
     return false;
 }