You are here

private function HamlView::_getCachedViewFileName in Sassy 7

* Generates the cached view file path. *

Parameters

string source view file path: * @return string cached view file path * @access private

1 call to HamlView::_getCachedViewFileName()
HamlView::_render in phamlp/Cake/views/haml.php
* Renders and returns output for given view filename with its * array of data. * *

File

phamlp/Cake/views/haml.php, line 278

Class

HamlView
Haml allows you to write view files in {@link Haml http://haml-lang.com/} and render them using {@link http://phamlp.googlecode.com PHamlP}.

Code

private function _getCachedViewFileName($file) {
  $cachedViewFile = str_replace(substr($file, strrpos($file, '.')), '.ctp', $file);
  if ($this->useCachePath) {
    $cachedViewFile = str_replace(VIEWS, CACHE . 'haml' . DS, $cachedViewFile);
    if (!is_file($cachedViewFile)) {
      @mkdir(dirname($cachedViewFile), $this->filePermission, true);
    }
  }
  return $cachedViewFile;
}