diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-12-23 14:33:23 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-12-23 14:33:23 -0500 |
commit | 04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch) | |
tree | d56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /_darcs/pristine/classes/Memcached_DataObject.php | |
parent | eb2f9c98ac115ce67e9a740b200c832153ffa05c (diff) |
change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function
headers have to be in K&R style (opening brace on its own line),
instead of having the opening brace on the same line as the function
and parameters. So, a little perl magic found all the function
definitions and move the opening brace to the next line (properly
indented... usually).
darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
Diffstat (limited to '_darcs/pristine/classes/Memcached_DataObject.php')
-rw-r--r-- | _darcs/pristine/classes/Memcached_DataObject.php | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/_darcs/pristine/classes/Memcached_DataObject.php b/_darcs/pristine/classes/Memcached_DataObject.php index 1d12730c9..b9f599dbc 100644 --- a/_darcs/pristine/classes/Memcached_DataObject.php +++ b/_darcs/pristine/classes/Memcached_DataObject.php @@ -23,7 +23,8 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; class Memcached_DataObject extends DB_DataObject { - function &staticGet($cls, $k, $v=null) { + function &staticGet($cls, $k, $v=null) + { if (is_null($v)) { $v = $k; # XXX: HACK! @@ -44,7 +45,8 @@ class Memcached_DataObject extends DB_DataObject } } - function &pkeyGet($cls, $kv) { + function &pkeyGet($cls, $kv) + { $i = Memcached_DataObject::multicache($cls, $kv); if ($i) { return $i; @@ -62,12 +64,14 @@ class Memcached_DataObject extends DB_DataObject } } - function insert() { + function insert() + { $result = parent::insert(); return $result; } - function update($orig=null) { + function update($orig=null) + { if (is_object($orig) && $orig instanceof Memcached_DataObject) { $orig->decache(); # might be different keys } @@ -78,7 +82,8 @@ class Memcached_DataObject extends DB_DataObject return $result; } - function delete() { + function delete() + { $this->decache(); # while we still have the values! return parent::delete(); } @@ -100,7 +105,8 @@ class Memcached_DataObject extends DB_DataObject } } - function keyTypes() { + function keyTypes() + { global $_DB_DATAOBJECT; if (!isset($_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"])) { $this->databaseStructure(); @@ -109,7 +115,8 @@ class Memcached_DataObject extends DB_DataObject return $_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"]; } - function encache() { + function encache() + { $c = $this->memcache(); if (!$c) { return false; @@ -133,7 +140,8 @@ class Memcached_DataObject extends DB_DataObject } } - function decache() { + function decache() + { $c = $this->memcache(); if (!$c) { return false; @@ -158,7 +166,8 @@ class Memcached_DataObject extends DB_DataObject } } - function multicache($cls, $kv) { + function multicache($cls, $kv) + { ksort($kv); $c = Memcached_DataObject::memcache(); if (!$c) { @@ -170,7 +179,8 @@ class Memcached_DataObject extends DB_DataObject } } - function getSearchEngine($table) { + function getSearchEngine($table) + { require_once INSTALLDIR.'/lib/search_engines.php'; static $search_engine; if (!isset($search_engine)) { |