mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 12:32:14 +09:00
Reformat class files based on PHP coding convention
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9828 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
339b2de797
commit
be6d9a096d
6 changed files with 1085 additions and 1081 deletions
12
classes/cache/CacheApc.class.php
vendored
12
classes/cache/CacheApc.class.php
vendored
|
|
@ -1,14 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class CacheApc
|
* @class CacheApc
|
||||||
* @author NHN (developer@xpressengine.com)
|
* @author NHN (developer@xpressengine.com)
|
||||||
* @brief APC Handler
|
* @brief APC Handler
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
class CacheApc extends CacheBase {
|
||||||
class CacheApc extends CacheBase {
|
|
||||||
var $valid_time = 36000;
|
var $valid_time = 36000;
|
||||||
|
|
||||||
function getInstance($opt=null){
|
function getInstance($opt=null){
|
||||||
|
|
@ -68,5 +66,7 @@
|
||||||
function truncate() {
|
function truncate() {
|
||||||
return apc_clear_cache('user');
|
return apc_clear_cache('user');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
/* End of file CacheApc.class.php */
|
||||||
|
/* Location: ./classes/cache/CacheApc.class.php */
|
||||||
|
|
|
||||||
8
classes/cache/CacheHandler.class.php
vendored
8
classes/cache/CacheHandler.class.php
vendored
|
|
@ -4,21 +4,20 @@
|
||||||
* @author NHN (developer@xpressengine.com)
|
* @author NHN (developer@xpressengine.com)
|
||||||
* @brief Cache Handler
|
* @brief Cache Handler
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class CacheHandler extends Handler {
|
class CacheHandler extends Handler {
|
||||||
var $handler = null;
|
var $handler = null;
|
||||||
var $keyGroupVersions = null;
|
var $keyGroupVersions = null;
|
||||||
|
|
||||||
function &getInstance($target='object') {
|
function &getInstance($target = 'object') {
|
||||||
if(!$GLOBALS['__XE_CACHE_HANDLER__'][$target]) {
|
if(!$GLOBALS['__XE_CACHE_HANDLER__'][$target]) {
|
||||||
$GLOBALS['__XE_CACHE_HANDLER__'][$target] = new CacheHandler($target);
|
$GLOBALS['__XE_CACHE_HANDLER__'][$target] = new CacheHandler($target);
|
||||||
}
|
}
|
||||||
return $GLOBALS['__XE_CACHE_HANDLER__'][$target];
|
return $GLOBALS['__XE_CACHE_HANDLER__'][$target];
|
||||||
}
|
}
|
||||||
|
|
||||||
function CacheHandler($target, $info=null) {
|
function CacheHandler($target, $info = null) {
|
||||||
if(!$info) $info = Context::getDBInfo();
|
if(!$info) $info = Context::getDBInfo();
|
||||||
if($info){
|
if($info){
|
||||||
if($target == 'object'){
|
if($target == 'object'){
|
||||||
|
|
@ -127,4 +126,5 @@ class CacheBase{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of file : CacheHandler.class.php */
|
/* End of file CacheHandler.class.php */
|
||||||
|
/* Location: ./classes/cache/CacheHandler.class.php */
|
||||||
|
|
|
||||||
14
classes/cache/CacheMemcache.class.php
vendored
14
classes/cache/CacheMemcache.class.php
vendored
|
|
@ -1,14 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class CacheMemcache
|
* @class CacheMemcache
|
||||||
* @author NHN (developer@xpressengine.com)
|
* @author NHN (developer@xpressengine.com)
|
||||||
* @brief Memcache Handler
|
* @brief Memcache Handler
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class CacheMemcache extends CacheBase {
|
class CacheMemcache extends CacheBase {
|
||||||
|
|
||||||
var $valid_time = 36000;
|
var $valid_time = 36000;
|
||||||
var $Memcache;
|
var $Memcache;
|
||||||
|
|
||||||
|
|
@ -90,8 +88,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate() {
|
function truncate() {
|
||||||
// not support memcached
|
// not supported on memcached
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
/* End of file CacheMemcache.class.php */
|
||||||
|
/* Location: ./classes/cache/CacheMemcache.class.php */
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class FileHandler
|
* @class FileHandler
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief contains methods for accessing file system
|
* @brief contains methods for accessing file system
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class FileHandler {
|
class FileHandler {
|
||||||
/**
|
/**
|
||||||
* @brief changes path of target file, directory into absolute path
|
* @brief changes path of target file, directory into absolute path
|
||||||
* @param[in] $source path
|
* @param[in] $source path
|
||||||
|
|
@ -672,5 +672,7 @@
|
||||||
{
|
{
|
||||||
return (is_readable($filename) && !!filesize($filename));
|
return (is_readable($filename) && !!filesize($filename));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
/* End of file FileObject.class.php */
|
||||||
|
/* Location: ./classes/file/FileObject.class.php */
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class FileObject
|
* @class FileObject
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief file abstraction class
|
* @brief file abstraction class
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class FileObject extends Object
|
class FileObject extends Object
|
||||||
{
|
{
|
||||||
var $fp = null; ///< file descriptor
|
var $fp = null; ///< file descriptor
|
||||||
var $path = null; ///< file path
|
var $path = null; ///< file path
|
||||||
var $mode = "r"; ///< file open mode
|
var $mode = "r"; ///< file open mode
|
||||||
|
|
@ -123,6 +123,7 @@
|
||||||
$this->fp = null;
|
$this->fp = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
/* End of file FileObject.class.php */
|
||||||
?>
|
/* Location: ./classes/file/FileObject.class.php */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class Object
|
* @class Object
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief Base class design to pass the Object instance between XE Modules
|
* @brief Base class design to pass the Object instance between XE Modules
|
||||||
|
|
@ -7,8 +7,7 @@
|
||||||
* @remark Every modules inherits from Object class. It includes error, message, and other variables for communicatin purpose
|
* @remark Every modules inherits from Object class. It includes error, message, and other variables for communicatin purpose
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class Object {
|
class Object {
|
||||||
|
|
||||||
var $error = 0; // / "Error code (if 0, it is not an error)
|
var $error = 0; // / "Error code (if 0, it is not an error)
|
||||||
var $message = 'success'; // / "Error message (if success, it is not an error)
|
var $message = 'success'; // / "Error message (if success, it is not an error)
|
||||||
|
|
||||||
|
|
@ -144,5 +143,7 @@
|
||||||
function toBoolean() {
|
function toBoolean() {
|
||||||
return $this->toBool();
|
return $this->toBool();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
/* End of file Object.class.php */
|
||||||
|
/* Location: ./classes/object/Object.class.php */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue