HosipLan

Untitled

Sep 6th, 2011
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1.     /**
  2.      * Caches results of function/method calls.
  3.      * @param  mixed
  4.      * @return mixed
  5.      */
  6.     public function call($function, $args = array(), $dp = array())
  7.     {
  8.         $key = array($function $args);
  9.         if ($this->load($key) === NULL) {
  10.             return $this->save($key, call_user_func_array($function, $args), $dp);
  11.         } else {
  12.             return $this->data;
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment