Skip to content

Commit 88e45cf

Browse files
author
Sebastian Bergmann
committed
Convert double-quotes to single-quotes.
1 parent 6f3f47e commit 88e45cf

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

pear/Cache.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//
1919
// $Id$
2020

21-
require_once "Cache/Error.php";
21+
require_once 'Cache/Error.php';
2222

2323
/**
2424
* Cache is a base class for cache implementations.
@@ -39,18 +39,18 @@
3939
*
4040
* Usage example of the generic data cache:
4141
*
42-
* require_once("Cache.php");
42+
* require_once('Cache.php');
4343
*
44-
* $cache = new Cache("file", array("cache_dir" => "cache/") );
45-
* $id = $cache->generateID("testentry");
44+
* $cache = new Cache('file', array('cache_dir' => 'cache/') );
45+
* $id = $cache->generateID('testentry');
4646
*
4747
* if ($data = $cache->get($id)) {
4848
* print "Cache hit.<br>Data: $data";
4949
*
5050
* } else {
51-
* $data = "data of any kind";
51+
* $data = 'data of any kind';
5252
* $cache->save($id, $data);
53-
* print "Cache miss.<br>";
53+
* print 'Cache miss.<br>';
5454
* }
5555
*
5656
* WARNING: No File/DB-Table-Row locking is implemented yet,
@@ -124,7 +124,7 @@ class Cache extends PEAR {
124124
* @param string Name of storage container class
125125
* @param array Array with storage class dependend config options
126126
*/
127-
function Cache($storage_driver, $storage_options = "")
127+
function Cache($storage_driver, $storage_options = '')
128128
{
129129
$this->PEAR();
130130
$storage_driver = strtolower($storage_driver);
@@ -171,9 +171,9 @@ function setCaching($state)
171171
* @return mixed cached data or NULL on failure
172172
* @access public
173173
*/
174-
function get($id, $group = "default") {
174+
function get($id, $group = 'default') {
175175
if (!$this->caching)
176-
return "";
176+
return '';
177177

178178
if ($this->isCached($id, $group) && !$this->isExpired($id, $group))
179179
return $this->load($id, $group);
@@ -191,11 +191,11 @@ function get($id, $group = "default") {
191191
* @return boolean
192192
* @access public
193193
*/
194-
function save($id, $data, $expires = 0, $group = "default") {
194+
function save($id, $data, $expires = 0, $group = 'default') {
195195
if (!$this->caching)
196196
return true;
197197

198-
return $this->extSave($id, $data, "",$expires, $group);
198+
return $this->extSave($id, $data, '',$expires, $group);
199199
} // end func save
200200

201201
/**
@@ -211,7 +211,7 @@ function save($id, $data, $expires = 0, $group = "default") {
211211
* @access public
212212
* @see getUserdata()
213213
*/
214-
function extSave($id, $cachedata, $userdata, $expires = 0, $group = "default") {
214+
function extSave($id, $cachedata, $userdata, $expires = 0, $group = 'default') {
215215
if (!$this->caching)
216216
return true;
217217

@@ -226,9 +226,9 @@ function extSave($id, $cachedata, $userdata, $expires = 0, $group = "default") {
226226
* @return mixed cached data or NULL on failure
227227
* @access public
228228
*/
229-
function load($id, $group = "default") {
229+
function load($id, $group = 'default') {
230230
if (!$this->caching)
231-
return "";
231+
return '';
232232

233233
return $this->container->load($id, $group);
234234
} // end func load
@@ -242,9 +242,9 @@ function load($id, $group = "default") {
242242
* @access public
243243
* @see extSave()
244244
*/
245-
function getUserdata($id, $group = "default") {
245+
function getUserdata($id, $group = 'default') {
246246
if (!$this->caching)
247-
return "";
247+
return '';
248248

249249
return $this->container->getUserdata($id, $group);
250250
} // end func getUserdata
@@ -257,7 +257,7 @@ function getUserdata($id, $group = "default") {
257257
* @return boolean
258258
* @access public
259259
*/
260-
function delete($id, $group = "default") {
260+
function delete($id, $group = 'default') {
261261
if (!$this->caching)
262262
return true;
263263

@@ -270,7 +270,7 @@ function delete($id, $group = "default") {
270270
* @param string cache group, if empty all groups will be flashed
271271
* @return integer number of removed datasets
272272
*/
273-
function flush($group = "") {
273+
function flush($group = '') {
274274
if (!$this->caching)
275275
return true;
276276

@@ -287,7 +287,7 @@ function flush($group = "") {
287287
* @return boolean
288288
* @access public
289289
*/
290-
function isCached($id, $group = "default") {
290+
function isCached($id, $group = 'default') {
291291
if (!$this->caching)
292292
return false;
293293

@@ -308,7 +308,7 @@ function isCached($id, $group = "default") {
308308
* @return boolean
309309
* @access public
310310
*/
311-
function isExpired($id, $group = "default", $max_age = 0) {
311+
function isExpired($id, $group = 'default', $max_age = 0) {
312312
if (!$this->caching)
313313
return true;
314314

0 commit comments

Comments
 (0)