1 | <?php |
||
9 | class Cache |
||
10 | { |
||
11 | private $cache_path = ''; |
||
12 | private $expire = null; |
||
13 | |||
14 | 2 | function __construct() |
|
19 | |||
20 | function cache(){ |
||
23 | |||
24 | function setCache($name,$data){ |
||
28 | |||
29 | 2 | function getCache($name, $expire=null){ |
|
46 | |||
47 | function writeFile($name, $content){ |
||
58 | |||
59 | 2 | function readFile($name){ |
|
72 | } |
||
73 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.