PHP 5 방식의 생성자 (__construct) 사용

This commit is contained in:
Kijin Sung 2015-04-01 11:30:04 +09:00
parent 73178c94bb
commit 15d3ba7ca1
88 changed files with 113 additions and 113 deletions

View file

@ -8,9 +8,9 @@ class wap extends mobileXE {
/**
* @brief constructor
**/
function wap()
function __construct()
{
parent::mobileXE();
parent::__construct();
}
/**

View file

@ -9,9 +9,9 @@ class wap extends mobileXE
/**
* @brief constructor
**/
function wap()
function __construct()
{
parent::mobileXE();
parent::__construct();
}
/**

View file

@ -76,7 +76,7 @@ class mobileXE
/**
* @brief constructor
*/
function mobileXE()
function __construct()
{
// Check navigation mode
if(Context::get('nm'))

View file

@ -8,9 +8,9 @@ class wap extends mobileXE
/**
* @brief constructor
*/
function wap()
function __construct()
{
parent::mobileXE();
parent::__construct();
}
/**

View file

@ -30,7 +30,7 @@ class CacheApc extends CacheBase
*
* @return void
*/
function CacheApc()
function __construct()
{
}

View file

@ -35,7 +35,7 @@ class CacheFile extends CacheBase
*
* @return void
*/
function CacheFile()
function __construct()
{
$this->cache_dir = _XE_PATH_ . $this->cache_dir;
FileHandler::makeDir($this->cache_dir);

View file

@ -49,7 +49,7 @@ class CacheHandler extends Handler
* @param boolean $always_use_file If set true, use a file cache always
* @return CacheHandler
*/
function CacheHandler($target, $info = null, $always_use_file = false)
function __construct($target, $info = null, $always_use_file = false)
{
if(!$info)
{

View file

@ -36,7 +36,7 @@ class CacheMemcache extends CacheBase
* @param string $url url of memcache
* @return void
*/
function CacheMemcache($url)
function __construct($url)
{
//$config['url'] = array('memcache://localhost:11211');
$config['url'] = is_array($url) ? $url : array($url);

View file

@ -32,7 +32,7 @@ class CacheWincache extends CacheBase
*
* @return void
*/
function CacheWincache()
function __construct()
{
}

View file

@ -175,7 +175,7 @@ class Context
*
* @return void
*/
function Context()
function __construct()
{
$this->oFrontEndFileHandler = new FrontEndFileHandler();
$this->get_vars = new stdClass();

View file

@ -219,7 +219,7 @@ class DB
* constructor
* @return void
*/
function DB()
function __construct()
{
$this->count_cache_path = _XE_PATH_ . $this->count_cache_path;
$this->cache_file = _XE_PATH_ . $this->cache_file;

View file

@ -49,7 +49,7 @@ class DBCubrid extends DB
* constructor
* @return void
*/
function DBCubrid()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -42,7 +42,7 @@ class DBMssql extends DB
* Constructor
* @return void
*/
function DBMssql()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -43,7 +43,7 @@ class DBMysql extends DB
* Constructor
* @return void
*/
function DBMysql()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -20,7 +20,7 @@ class DBMysql_innodb extends DBMysql
* Constructor
* @return void
*/
function DBMysql_innodb()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -20,7 +20,7 @@ class DBMysqli extends DBMysql
* Constructor
* @return void
*/
function DBMysqli()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -20,7 +20,7 @@ class DBMysqli_innodb extends DBMysql
* Constructor
* @return void
*/
function DBMysqli_innodb()
function __construct()
{
$this->_setDBInfo();
$this->_connect();

View file

@ -94,7 +94,7 @@ class Query extends Object
* @param string $priority
* @return void
*/
function Query($queryID = NULL
function __construct($queryID = NULL
, $action = NULL
, $columns = NULL
, $tables = NULL

View file

@ -33,7 +33,7 @@ class Subquery extends Query
* @param string $join_type
* @return void
*/
function Subquery($alias, $columns, $tables, $conditions, $groups, $orderby, $limit, $join_type = null)
function __construct($alias, $columns, $tables, $conditions, $groups, $orderby, $limit, $join_type = null)
{
$this->alias = $alias;

View file

@ -41,7 +41,7 @@ class Condition
* @param string $pipe
* @return void
*/
function Condition($column_name, $argument, $operation, $pipe)
function __construct($column_name, $argument, $operation, $pipe)
{
$this->column_name = $column_name;
$this->argument = $argument;

View file

@ -29,7 +29,7 @@ class ConditionGroup
* @param string $pipe
* @return void
*/
function ConditionGroup($conditions, $pipe = "")
function __construct($conditions, $pipe = "")
{
$this->conditions = array();
foreach($conditions as $condition)

View file

@ -17,9 +17,9 @@ class ConditionSubquery extends Condition
* @param string $pipe
* @return void
*/
function ConditionSubquery($column_name, $argument, $operation, $pipe = "")
function __construct($column_name, $argument, $operation, $pipe = "")
{
parent::Condition($column_name, $argument, $operation, $pipe);
parent::__construct($column_name, $argument, $operation, $pipe);
$this->_value = $this->argument->toString();
}

View file

@ -17,14 +17,14 @@ class ConditionWithArgument extends Condition
* @param string $pipe
* @return void
*/
function ConditionWithArgument($column_name, $argument, $operation, $pipe = "")
function __construct($column_name, $argument, $operation, $pipe = "")
{
if($argument === null)
{
$this->_show = false;
return;
}
parent::Condition($column_name, $argument, $operation, $pipe);
parent::__construct($column_name, $argument, $operation, $pipe);
$this->_value = $argument->getValue();
}

View file

@ -17,9 +17,9 @@ class ConditionWithoutArgument extends Condition
* @param string $pipe
* @return void
*/
function ConditionWithoutArgument($column_name, $argument, $operation, $pipe = "")
function __construct($column_name, $argument, $operation, $pipe = "")
{
parent::Condition($column_name, $argument, $operation, $pipe);
parent::__construct($column_name, $argument, $operation, $pipe);
$tmpArray = array('in' => 1, 'notin' => 1, 'not_in' => 1);
if(isset($tmpArray[$operation]))
{

View file

@ -23,9 +23,9 @@ class ClickCountExpression extends SelectExpression
* @param bool $click_count
* @return void
*/
function ClickCountExpression($column_name, $alias = NULL, $click_count = false)
function __construct($column_name, $alias = NULL, $click_count = false)
{
parent::SelectExpression($column_name, $alias);
parent::__construct($column_name, $alias);
if(!is_bool($click_count))
{

View file

@ -24,9 +24,9 @@ class DeleteExpression extends Expression
* @param mixed $value
* @return void
*/
function DeleteExpression($column_name, $value)
function __construct($column_name, $value)
{
parent::Expression($column_name);
parent::__construct($column_name);
$this->value = $value;
}

View file

@ -27,7 +27,7 @@ class Expression
* @param string $column_name
* @return void
*/
function Expression($column_name)
function __construct($column_name)
{
$this->column_name = $column_name;
}

View file

@ -23,9 +23,9 @@ class InsertExpression extends Expression
* @param object $argument
* @return void
*/
function InsertExpression($column_name, $argument)
function __construct($column_name, $argument)
{
parent::Expression($column_name);
parent::__construct($column_name);
$this->argument = $argument;
}

View file

@ -30,9 +30,9 @@ class SelectExpression extends Expression
* @param string $alias
* @return void
*/
function SelectExpression($column_name, $alias = NULL)
function __construct($column_name, $alias = NULL)
{
parent::Expression($column_name);
parent::__construct($column_name);
$this->column_alias = $alias;
}

View file

@ -16,9 +16,9 @@ class StarExpression extends SelectExpression
* constructor, set the column to asterisk
* @return void
*/
function StarExpression()
function __construct()
{
parent::SelectExpression("*");
parent::__construct("*");
}
function getArgument()

View file

@ -23,9 +23,9 @@ class UpdateExpression extends Expression
* @param object $argument
* @return void
*/
function UpdateExpression($column_name, $argument)
function __construct($column_name, $argument)
{
parent::Expression($column_name);
parent::__construct($column_name);
$this->argument = $argument;
}

View file

@ -23,9 +23,9 @@ class UpdateExpressionWithoutArgument extends UpdateExpression
* @param object $argument
* @return void
*/
function UpdateExpressionWithoutArgument($column_name, $argument)
function __construct($column_name, $argument)
{
parent::Expression($column_name);
parent::__construct($column_name);
$this->argument = $argument;
}

View file

@ -40,7 +40,7 @@ class Limit
* @param int $page_count
* @return void
*/
function Limit($list_count, $page = NULL, $page_count = NULL)
function __construct($list_count, $page = NULL, $page_count = NULL)
{
$this->list_count = $list_count;
if($page)

View file

@ -27,7 +27,7 @@ class OrderByColumn
* @param string $sort_order
* @return void
*/
function OrderByColumn($column_name, $sort_order)
function __construct($column_name, $sort_order)
{
$this->column_name = $column_name;
$this->sort_order = $sort_order;

View file

@ -34,9 +34,9 @@ class CubridTableWithHint extends Table
* @param array $index_hints_list
* @return void
*/
function CubridTableWithHint($name, $alias = NULL, $index_hints_list)
function __construct($name, $alias = NULL, $index_hints_list)
{
parent::Table($name, $alias);
parent::__construct($name, $alias);
$this->index_hints_list = $index_hints_list;
}

View file

@ -27,7 +27,7 @@ class IndexHint
* @param string $index_hint_type
* @return void
*/
function IndexHint($index_name, $index_hint_type)
function __construct($index_name, $index_hint_type)
{
$this->index_name = $index_name;
$this->index_hint_type = $index_hint_type;

View file

@ -32,9 +32,9 @@ class JoinTable extends Table
* @param array $conditions
* @return void
*/
function JoinTable($name, $alias, $join_type, $conditions)
function __construct($name, $alias, $join_type, $conditions)
{
parent::Table($name, $alias);
parent::__construct($name, $alias);
$this->join_type = $join_type;
$this->conditions = $conditions;
}

View file

@ -34,9 +34,9 @@ class MssqlTableWithHint extends Table
* @param string $index_hints_list
* @return void
*/
function MssqlTableWithHint($name, $alias = NULL, $index_hints_list)
function __construct($name, $alias = NULL, $index_hints_list)
{
parent::Table($name, $alias);
parent::__construct($name, $alias);
$this->index_hints_list = $index_hints_list;
}

View file

@ -34,9 +34,9 @@ class MysqlTableWithHint extends Table
* @param string $index_hints_list
* @return void
*/
function MysqlTableWithHint($name, $alias = NULL, $index_hints_list)
function __construct($name, $alias = NULL, $index_hints_list)
{
parent::Table($name, $alias);
parent::__construct($name, $alias);
$this->index_hints_list = $index_hints_list;
}

View file

@ -27,7 +27,7 @@ class Table
* @param string $alias
* @return void
*/
function Table($name, $alias = NULL)
function __construct($name, $alias = NULL)
{
$this->name = $name;
$this->alias = $alias;

View file

@ -38,7 +38,7 @@ class ExtraVar
* @param int $module_srl Sequence of module
* @return void
*/
function ExtraVar($module_srl)
function __construct($module_srl)
{
$this->module_srl = $module_srl;
}

View file

@ -34,7 +34,7 @@ class FileObject extends Object
* @param string $mode File open mode
* @return void
*/
function FileObject($path, $mode)
function __construct($path, $mode)
{
if($path != NULL)
{

View file

@ -41,7 +41,7 @@ class XEHttpRequest
* constructor
* @return void
*/
function XEHttpRequest($host, $port, $scheme='')
function __construct($host, $port, $scheme='')
{
$this->m_host = $host;
$this->m_port = $port;

View file

@ -137,7 +137,7 @@ class Mail extends PHPMailer
*
* @return void
*/
function Mail()
function __construct()
{
}

View file

@ -32,7 +32,7 @@ class ModuleHandler extends Handler
* @return void
* */
function ModuleHandler($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '')
function __construct($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '')
{
// If XE has not installed yet, set module as install
if(!Context::isInstalled())

View file

@ -40,7 +40,7 @@ class Object
* @param string $message Error message
* @return void
*/
function Object($error = 0, $message = 'success')
function __construct($error = 0, $message = 'success')
{
$this->setError($error);
$this->setMessage($message);

View file

@ -30,7 +30,7 @@ class PageHandler extends Handler
* @return void
*/
function PageHandler($total_count, $total_page, $cur_page, $page_count = 10)
function __construct($total_count, $total_page, $cur_page, $page_count = 10)
{
$this->total_count = $total_count;
$this->total_page = $total_page;

View file

@ -260,7 +260,7 @@ class EmbedFilter
* @constructor
* @return void
*/
function EmbedFilter()
function __construct()
{
$this->_makeWhiteDomainList();

View file

@ -9,7 +9,7 @@ class Purifier
private $_config;
private $_def;
public function Purifier()
public function __construct()
{
$this->_checkCacheDir();

View file

@ -22,7 +22,7 @@ class Security
* @param mixed $var Target context
* @return void
*/
function Security($var = NULL)
function __construct($var = NULL)
{
$this->_targetVar = $var;
}

View file

@ -79,7 +79,7 @@ class XmlJsFilter extends XmlParser
* @return void
*/
function XmlJsFilter($path, $xml_file)
function __construct($path, $xml_file)
{
if(substr($path, -1) !== '/')
{

View file

@ -53,7 +53,7 @@ class XmlLangParser extends XmlParser
* @param string $lang_type
* @return void
*/
function XmlLangParser($xml_file, $lang_type)
function __construct($xml_file, $lang_type)
{
$this->lang_type = $lang_type;
$this->xml_file = $xml_file;

View file

@ -49,7 +49,7 @@ class XmlQueryParser extends XmlParser
* constructor
* @return void
*/
function XmlQueryParser()
function __construct()
{
}

View file

@ -60,7 +60,7 @@ class DBParser
*
* @return void
*/
function DBParser($escape_char_left, $escape_char_right = "", $table_prefix = "xe_")
function __construct($escape_char_left, $escape_char_right = "", $table_prefix = "xe_")
{
$this->escape_char_left = $escape_char_left;
if($escape_char_right !== "")

View file

@ -30,7 +30,7 @@ class QueryParser
* @param bool $isSubQuery
* @return void
*/
function QueryParser($query = NULL, $isSubQuery = FALSE)
function __construct($query = NULL, $isSubQuery = FALSE)
{
if($query)
{

View file

@ -64,7 +64,7 @@ class Argument
* @return void
*/
function Argument($name, $value)
function __construct($name, $value)
{
$this->value = $value;
$this->name = $name;

View file

@ -23,7 +23,7 @@ class ConditionArgument extends Argument
* @param string $operation
* @return void
*/
function ConditionArgument($name, $value, $operation)
function __construct($name, $value, $operation)
{
$operationList = array('in' => 1, 'notin' => 1, 'not_in' => 1, 'between' => 1);
if(isset($value) && isset($operationList[$operation]) && !is_array($value) && $value != '')
@ -32,7 +32,7 @@ class ConditionArgument extends Argument
$value = str_replace('\'', '', $value);
$value = explode(',', $value);
}
parent::Argument($name, $value);
parent::__construct($name, $value);
$this->operation = $operation;
}

View file

@ -58,7 +58,7 @@ class DefaultValue
* @param mixed $value value
* @return void
*/
function DefaultValue($column_name, $value)
function __construct($column_name, $value)
{
$dbParser = DB::getParser();
$this->column_name = $dbParser->parseColumnName($column_name);

View file

@ -58,7 +58,7 @@ class QueryArgument
* @param bool $ignore_value
* @return void
*/
function QueryArgument($tag, $ignore_value = FALSE)
function __construct($tag, $ignore_value = FALSE)
{
static $number_of_arguments = 0;

View file

@ -59,7 +59,7 @@ class QueryArgumentValidator
* @param QueryArgument $argument
* @return void
*/
function QueryArgumentValidator($tag, $argument)
function __construct($tag, $argument)
{
$this->argument = $argument;
$this->argument_name = $this->argument->getArgumentName();

View file

@ -25,7 +25,7 @@ class ColumnTag
* @param string $name
* @return void
*/
function ColumnTag($name)
function __construct($name)
{
$this->name = $name;
}

View file

@ -25,9 +25,9 @@ class InsertColumnTag extends ColumnTag
*
* @return void
*/
function InsertColumnTag($column)
function __construct($column)
{
parent::ColumnTag($column->attrs->name);
parent::__construct($column->attrs->name);
$dbParser = DB::getParser();
$this->name = $dbParser->parseColumnName($this->name);
$this->argument = new QueryArgument($column);

View file

@ -17,9 +17,9 @@ class InsertColumnTagWithoutArgument extends ColumnTag
* @param object $column
* @return void
*/
function InsertColumnTagWithoutArgument($column)
function __construct($column)
{
parent::ColumnTag($column->attrs->name);
parent::__construct($column->attrs->name);
$dbParser = DB::getParser();
$this->name = $dbParser->parseColumnName($this->name);
}

View file

@ -24,7 +24,7 @@ class InsertColumnsTag
* @param array|string $xml_columns
* @return void
*/
function InsertColumnsTag($xml_columns)
function __construct($xml_columns)
{
$this->columns = array();

View file

@ -31,16 +31,16 @@ class SelectColumnTag extends ColumnTag
* @param string|object $column
* @return void
*/
function SelectColumnTag($column)
function __construct($column)
{
if($column == "*" || $column->attrs->name == '*')
{
parent::ColumnTag(NULL);
parent::__construct(NULL);
$this->name = "*";
}
else
{
parent::ColumnTag($column->attrs->name);
parent::__construct($column->attrs->name);
$dbParser = DB::getParser();
$this->name = $dbParser->parseExpression($this->name);

View file

@ -25,7 +25,7 @@ class SelectColumnsTag
* @internal param \Xml_Node_ $xml_columns
* @return void
*/
function SelectColumnsTag($xml_columns_tag)
function __construct($xml_columns_tag)
{
if(!$xml_columns_tag)
{

View file

@ -31,9 +31,9 @@ class UpdateColumnTag extends ColumnTag
* @param object $column
* @return void
*/
function UpdateColumnTag($column)
function __construct($column)
{
parent::ColumnTag($column->attrs->name);
parent::__construct($column->attrs->name);
$dbParser = DB::getParser();
$this->name = $dbParser->parseColumnName($this->name);

View file

@ -24,7 +24,7 @@ class UpdateColumnsTag
* @param array|object $xml_columns
* @return void
*/
function UpdateColumnsTag($xml_columns)
function __construct($xml_columns)
{
$this->columns = array();

View file

@ -29,7 +29,7 @@ class ConditionGroupTag
* @param string $pipe
* @return void
*/
function ConditionGroupTag($conditions, $pipe = "")
function __construct($conditions, $pipe = "")
{
$this->pipe = $pipe;

View file

@ -59,7 +59,7 @@ class ConditionTag
* @param object $condition
* @return void
*/
function ConditionTag($condition)
function __construct($condition)
{
$this->operation = $condition->attrs->operation;
$this->pipe = $condition->attrs->pipe;

View file

@ -22,7 +22,7 @@ class ConditionsTag
* @param object $xml_conditions
* @return void
*/
function ConditionsTag($xml_conditions)
function __construct($xml_conditions)
{
$this->condition_groups = array();
if(!$xml_conditions)

View file

@ -16,9 +16,9 @@ class JoinConditionsTag extends ConditionsTag
* @param object $xml_conditions
* @return void
*/
function JoinConditionsTag($xml_conditions)
function __construct($xml_conditions)
{
parent::ConditionsTag($xml_conditions);
parent::__construct($xml_conditions);
$this->condition_groups[0]->conditions[0]->setPipe("");
}

View file

@ -22,7 +22,7 @@ class GroupsTag
* @param array|string $xml_groups
* @return void
*/
function GroupsTag($xml_groups)
function __construct($xml_groups)
{
$this->groups = array();

View file

@ -46,7 +46,7 @@ class IndexTag
* @param object $index
* @return void
*/
function IndexTag($index)
function __construct($index)
{
$this->argument_name = $index->attrs->var;

View file

@ -40,7 +40,7 @@ class LimitTag
* @param object $index
* @return void
*/
function LimitTag($index)
function __construct($index)
{
if($index->page && $index->page->attrs && $index->page_count && $index->page_count->attrs)
{

View file

@ -46,7 +46,7 @@ class NavigationTag
* @param object $xml_navigation
* @return void
*/
function NavigationTag($xml_navigation)
function __construct($xml_navigation)
{
$this->order = array();
if($xml_navigation)

View file

@ -119,7 +119,7 @@ class QueryTag
* @param bool $isSubQuery
* @return void
*/
function QueryTag($query, $isSubQuery = FALSE)
function __construct($query, $isSubQuery = FALSE)
{
$this->action = $query->attrs->action;
$this->query_id = $query->attrs->id;

View file

@ -25,9 +25,9 @@ class HintTableTag extends TableTag
* @param array $index
* @return void
*/
function HintTableTag($table, $index)
function __construct($table, $index)
{
parent::TableTag($table);
parent::__construct($table);
$this->index = $index;
}

View file

@ -66,7 +66,7 @@ class TableTag
* @param object $table XML <table> tag
* @return void
*/
function TableTag($table)
function __construct($table)
{
$dbParser = DB::getParser();

View file

@ -33,7 +33,7 @@ class TablesTag
* @param object $xml_index_hints_tag
* @return void
*/
function TablesTag($xml_tables_tag, $xml_index_hints_tag = NULL)
function __construct($xml_tables_tag, $xml_index_hints_tag = NULL)
{
$this->tables = array();

View file

@ -30,7 +30,7 @@ class commentItem extends Object
* @param array $columnList
* @return void
*/
function commentItem($comment_srl = 0, $columnList = array())
function __construct($comment_srl = 0, $columnList = array())
{
$this->comment_srl = $comment_srl;
$this->columnList = $columnList;

View file

@ -53,7 +53,7 @@ class documentItem extends Object
* @param array columnList
* @return void
*/
function documentItem($document_srl = 0, $load_extra_vars = true, $columnList = array())
function __construct($document_srl = 0, $load_extra_vars = true, $columnList = array())
{
$this->document_srl = $document_srl;
$this->columnList = $columnList;

View file

@ -15,7 +15,7 @@ class emoticon extends EditorHandler
/**
* @brief editor_sequence and components out of the path
*/
function emoticon($editor_sequence, $component_path)
function __construct($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;

View file

@ -14,7 +14,7 @@ class image_gallery extends EditorHandler
/**
* @brief editor_sequence and components out of the path
*/
function image_gallery($editor_sequence, $component_path)
function __construct($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;

View file

@ -14,7 +14,7 @@ class image_link extends EditorHandler
/**
* @brief editor_sequence and components out of the path
*/
function image_link($editor_sequence, $component_path)
function __construct($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;

View file

@ -14,7 +14,7 @@ class poll_maker extends EditorHandler
/**
* @brief editor_sequence and components out of the path
*/
function poll_maker($editor_sequence, $component_path)
function __construct($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;

View file

@ -18,7 +18,7 @@ class member extends ModuleObject {
*
* @return void
*/
function member()
function __construct()
{
if(!Context::isInstalled()) return;

View file

@ -13,7 +13,7 @@ class session extends ModuleObject
var $lifetime = 18000;
var $session_started = false;
function session()
function __construct()
{
if(Context::isInstalled()) $this->session_started= true;
}