Skip to content

Commit

Permalink
Making private things protected.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 7, 2010
1 parent 4c0fd76 commit 92fec45
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cake/libs/view/helpers/cache.php
Expand Up @@ -78,7 +78,7 @@ public function afterLayout($layoutFile) {
* @param boolean $cache Whether or not a cache file should be written.
* @return string view ouput
*/
function cache($file, $out, $cache = false) {
public function cache($file, $out, $cache = false) {
$cacheTime = 0;
$useCallbacks = false;
$cacheAction = $this->_View->cacheAction;
Expand Down Expand Up @@ -117,10 +117,10 @@ function cache($file, $out, $cache = false) {
}

if ($cacheTime != '' && $cacheTime > 0) {
$this->__parseFile($file, $out);
$this->_parseFile($file, $out);
if ($cache === true) {
$cached = $this->__parseOutput($out);
$this->__writeFile($cached, $cacheTime, $useCallbacks);
$cached = $this->_parseOutput($out);
$this->_writeFile($cached, $cacheTime, $useCallbacks);
}
return $out;
} else {
Expand All @@ -133,9 +133,8 @@ function cache($file, $out, $cache = false) {
*
* @param string $file The filename that needs to be parsed.
* @param string $cache The cached content
* @access private
*/
function __parseFile($file, $cache) {
protected function _parseFile($file, $cache) {
if (is_file($file)) {
$file = file_get_contents($file);
} elseif ($file = fileExistsInPath($file)) {
Expand Down Expand Up @@ -173,9 +172,8 @@ function __parseFile($file, $cache) {
*
* @param string $cache Output to replace content in.
* @return string with all replacements made to <!--nocache--><!--nocache-->
* @access private
*/
function __parseOutput($cache) {
protected function _parseOutput($cache) {
$count = 0;
if (!empty($this->_match)) {
foreach ($this->_match as $found) {
Expand Down Expand Up @@ -207,9 +205,8 @@ function __parseOutput($cache) {
* @param string $content view content to write to a cache file.
* @param sting $timestamp Duration to set for cache file.
* @return boolean success of caching view.
* @access private
*/
function __writeFile($content, $timestamp, $useCallbacks = false) {
protected function _writeFile($content, $timestamp, $useCallbacks = false) {
$now = time();

if (is_numeric($timestamp)) {
Expand Down

0 comments on commit 92fec45

Please sign in to comment.