1 | <?php |
||
37 | class Dummy |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * Class constructor |
||
42 | * |
||
43 | * Setup Memcache(d) |
||
44 | * |
||
45 | * @return void |
||
|
|||
46 | */ |
||
47 | public function __construct() |
||
51 | |||
52 | /** |
||
53 | * Get |
||
54 | * |
||
55 | * Since this is the dummy class, it's always going to return FALSE. |
||
56 | * |
||
57 | * @param string $id |
||
58 | * @return boolean |
||
59 | */ |
||
60 | public function get($id) |
||
64 | |||
65 | /** |
||
66 | * Cache Set |
||
67 | * |
||
68 | * @param string $id |
||
69 | * @param mixed $data |
||
70 | * @param int $ttl |
||
71 | * @param boolean $raw |
||
72 | * @return boolean |
||
73 | */ |
||
74 | public function set($id, $data, $ttl = 60, $raw = false) |
||
78 | |||
79 | /** |
||
80 | * Delete from Cache |
||
81 | * |
||
82 | * @param mixed $id |
||
83 | * @return boolean |
||
84 | */ |
||
85 | public function delete($id) |
||
89 | |||
90 | /** |
||
91 | * Increment a raw value |
||
92 | * |
||
93 | * @param string $id |
||
94 | * @param int $offset |
||
95 | * @return mixed |
||
96 | */ |
||
97 | public function increment($id, $offset = 1) |
||
101 | |||
102 | /** |
||
103 | * Decrement a raw value |
||
104 | * |
||
105 | * @param string $id |
||
106 | * @param int $offset |
||
107 | * @return mixed |
||
108 | */ |
||
109 | public function decrement($id, $offset = 1) |
||
113 | |||
114 | /** |
||
115 | * Clean the cache |
||
116 | * |
||
117 | * @return boolean |
||
118 | */ |
||
119 | public function clean() |
||
123 | |||
124 | /** |
||
125 | * Cache Info |
||
126 | * |
||
127 | * @param string $type |
||
128 | * @return boolean |
||
129 | */ |
||
130 | public function cacheInfo($type = null) |
||
134 | |||
135 | /** |
||
136 | * Get Cache Metadata |
||
137 | * |
||
138 | * @param mixed $id |
||
139 | * @return boolean |
||
140 | */ |
||
141 | public function getMetadata($id) |
||
145 | |||
146 | /** |
||
147 | * Is this caching driver supported on the system? |
||
148 | * Of course this one is. |
||
149 | * |
||
150 | * @return boolean |
||
151 | */ |
||
152 | public function isSupported() |
||
156 | |||
157 | } |
||
158 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.