mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
Remove trailing whitespace
This commit is contained in:
parent
3b0030e82b
commit
a9f72a5cd2
81 changed files with 2455 additions and 2455 deletions
|
|
@ -14,10 +14,10 @@ class ConfigHelper
|
|||
* Cache plugin configuration during consolidation.
|
||||
*/
|
||||
protected static $_config_cache = array();
|
||||
|
||||
|
||||
/**
|
||||
* Consolidate configuration from multiple sources.
|
||||
*
|
||||
*
|
||||
* @param array $format
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -25,19 +25,19 @@ class ConfigHelper
|
|||
{
|
||||
self::$_config_cache = array();
|
||||
$result = array();
|
||||
|
||||
|
||||
foreach ($format as $key => $value)
|
||||
{
|
||||
$result[$key] = self::_parseConfigValue((array)$value);
|
||||
}
|
||||
|
||||
|
||||
self::$_config_cache = array();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse and get a configuration value.
|
||||
*
|
||||
*
|
||||
* @param array $value
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
@ -45,7 +45,7 @@ class ConfigHelper
|
|||
{
|
||||
$filters = array();
|
||||
$result = null;
|
||||
|
||||
|
||||
foreach ($value as $option)
|
||||
{
|
||||
$option = array_map('trim', explode(':', $option, 2));
|
||||
|
|
@ -90,12 +90,12 @@ class ConfigHelper
|
|||
$result = $temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($filters as $filter)
|
||||
{
|
||||
$result = $filter($result);
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use Rhymix\Framework\Exceptions\DBError;
|
|||
|
||||
/**
|
||||
* DB helper class.
|
||||
*
|
||||
*
|
||||
* We use instances of this class instead of raw PDO in order to provide
|
||||
* better logging and error handling while keeping backward compatibility.
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@ class DBHelper extends \PDO
|
|||
* Store the database type (e.g. master) here.
|
||||
*/
|
||||
protected $_type = 'master';
|
||||
|
||||
|
||||
/**
|
||||
* Set the database type.
|
||||
*/
|
||||
|
|
@ -26,10 +26,10 @@ class DBHelper extends \PDO
|
|||
{
|
||||
$this->_type = $type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a prepared statement.
|
||||
*
|
||||
*
|
||||
* @param string $statement
|
||||
* @param array $options
|
||||
* @return DBStmtHelper
|
||||
|
|
@ -39,7 +39,7 @@ class DBHelper extends \PDO
|
|||
{
|
||||
$start_time = microtime(true);
|
||||
$db_class = DB::getInstance($this->_type);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
/**
|
||||
|
|
@ -66,24 +66,24 @@ class DBHelper extends \PDO
|
|||
{
|
||||
Debug::addQuery($db_class->getQueryLog($statement, $elapsed_time));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is a new feature in Rhymix 2.0 so we don't have to mess
|
||||
* with status objects. We just throw an exception. Catch it!
|
||||
*/
|
||||
throw new DBError($e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Execute a query.
|
||||
*
|
||||
*
|
||||
* This method accepts additional parameters, but they are not for creating
|
||||
* prepared statements. They exist because PDO's own query() method accepts
|
||||
* various kinds of additional parameters, and we don't want to touch them.
|
||||
*
|
||||
*
|
||||
* @param string $statement
|
||||
* @param int $fetch_mode
|
||||
* @return DBStmtHelper|false
|
||||
|
|
@ -95,7 +95,7 @@ class DBHelper extends \PDO
|
|||
$db_class = DB::getInstance($this->_type);
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
/**
|
||||
|
|
@ -122,13 +122,13 @@ class DBHelper extends \PDO
|
|||
Debug::addQuery($db_class->getQueryLog($statement, $elapsed_time));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Execute a query and return the number of affected rows.
|
||||
*
|
||||
*
|
||||
* @param string $statement
|
||||
* @return int|false
|
||||
*/
|
||||
|
|
@ -137,7 +137,7 @@ class DBHelper extends \PDO
|
|||
{
|
||||
$start_time = microtime(true);
|
||||
$db_class = DB::getInstance($this->_type);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$result = parent::exec($statement);
|
||||
|
|
@ -156,7 +156,7 @@ class DBHelper extends \PDO
|
|||
Debug::addQuery($db_class->getQueryLog($statement, $elapsed_time));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Rhymix\Framework\Helpers;
|
|||
|
||||
/**
|
||||
* DB result helper class.
|
||||
*
|
||||
*
|
||||
* Instances of this class will be returned from DB queries.
|
||||
*/
|
||||
class DBResultHelper extends \BaseObject
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use Rhymix\Framework\Exceptions\DBError;
|
|||
|
||||
/**
|
||||
* DB Statement helper class.
|
||||
*
|
||||
*
|
||||
* We use instances of this class instead of raw PDOStatement in order to log
|
||||
* individual execute() calls of prepared statements. This is controlled by
|
||||
* the PDO::ATTR_STATEMENT_CLASS attribute set in the DB class.
|
||||
|
|
@ -19,7 +19,7 @@ class DBStmtHelper extends \PDOStatement
|
|||
* Store the database type (e.g. master) here.
|
||||
*/
|
||||
protected $_type = 'master';
|
||||
|
||||
|
||||
/**
|
||||
* Set the database type.
|
||||
*/
|
||||
|
|
@ -27,10 +27,10 @@ class DBStmtHelper extends \PDOStatement
|
|||
{
|
||||
$this->_type = $type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Execute a prepared statement.
|
||||
*
|
||||
*
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -38,7 +38,7 @@ class DBStmtHelper extends \PDOStatement
|
|||
{
|
||||
$start_time = microtime(true);
|
||||
$db_class = DB::getInstance($this->_type);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$result = parent::execute($params);
|
||||
|
|
@ -58,7 +58,7 @@ class DBStmtHelper extends \PDOStatement
|
|||
Debug::addQuery($db_class->getQueryLog($this->queryString, $elapsed_time));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ class SessionHelper
|
|||
public $is_admin = 'N';
|
||||
public $group_list = array();
|
||||
public $menu_list = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param int $member_srl (optional)
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -40,30 +40,30 @@ class SessionHelper
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if this user is a member.
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isMember()
|
||||
{
|
||||
return $this->member_srl > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if this user is an administrator.
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isAdmin()
|
||||
{
|
||||
return $this->is_admin === 'Y';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if this user is an administrator of a module.
|
||||
*
|
||||
*
|
||||
* @param int $module_srl (optional)
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -71,10 +71,10 @@ class SessionHelper
|
|||
{
|
||||
return $this->is_admin === 'Y' || \ModuleModel::isModuleAdmin($this, $module_srl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if this user is valid (not denied or limited).
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid()
|
||||
|
|
@ -88,10 +88,10 @@ class SessionHelper
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of groups that this user belongs to.
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getGroups()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue