From f83f0d5448aadcf76fbdac363d0fe7ea811ca9bf Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 19 Mar 2012 17:38:30 -0400 Subject: Added access modifiers to the rest of the Cubrid classes --- system/database/drivers/cubrid/cubrid_forge.php | 21 +++++++-------------- system/database/drivers/cubrid/cubrid_result.php | 23 ++++++++--------------- system/database/drivers/cubrid/cubrid_utility.php | 8 ++++---- 3 files changed, 19 insertions(+), 33 deletions(-) (limited to 'system/database/drivers/cubrid') diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php index 7d606ea36..6bfc7c28f 100644 --- a/system/database/drivers/cubrid/cubrid_forge.php +++ b/system/database/drivers/cubrid/cubrid_forge.php @@ -39,11 +39,10 @@ class CI_DB_cubrid_forge extends CI_DB_forge { /** * Create database * - * @access private * @param string the database name * @return bool */ - function _create_database($name) + protected function _create_database($name) { // CUBRID does not allow to create a database in SQL. The GUI tools // have to be used for this purpose. @@ -55,11 +54,10 @@ class CI_DB_cubrid_forge extends CI_DB_forge { /** * Drop database * - * @access private * @param string the database name * @return bool */ - function _drop_database($name) + protected function _drop_database($name) { // CUBRID does not allow to drop a database in SQL. The GUI tools // have to be used for this purpose. @@ -71,11 +69,10 @@ class CI_DB_cubrid_forge extends CI_DB_forge { /** * Process Fields * - * @access private * @param mixed the fields * @return string */ - function _process_fields($fields) + protected function _process_fields($fields) { $current_field_count = 0; $sql = ''; @@ -172,7 +169,6 @@ class CI_DB_cubrid_forge extends CI_DB_forge { /** * Create Table * - * @access private * @param string the table name * @param mixed the fields * @param mixed primary key(s) @@ -180,7 +176,7 @@ class CI_DB_cubrid_forge extends CI_DB_forge { * @param boolean should 'IF NOT EXISTS' be added to the SQL * @return bool */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) + protected function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) { $sql = 'CREATE TABLE '; @@ -232,10 +228,9 @@ class CI_DB_cubrid_forge extends CI_DB_forge { /** * Drop Table * - * @access private * @return string */ - function _drop_table($table) + protected function _drop_table($table) { return "DROP TABLE IF EXISTS ".$this->db->_escape_identifiers($table); } @@ -248,14 +243,13 @@ class CI_DB_cubrid_forge extends CI_DB_forge { * Generates a platform-specific query so that a table can be altered * Called by add_column(), drop_column(), and column_alter(), * - * @access private * @param string the ALTER type (ADD, DROP, CHANGE) * @param string the column name * @param array fields * @param string the field after which we should add the new field * @return object */ - function _alter_table($alter_type, $table, $fields, $after_field = '') + protected function _alter_table($alter_type, $table, $fields, $after_field = '') { $sql = 'ALTER TABLE '.$this->db->protect_identifiers($table).' '.$alter_type.' '; @@ -282,12 +276,11 @@ class CI_DB_cubrid_forge extends CI_DB_forge { * * Generates a platform-specific query so that a table can be renamed * - * @access private * @param string the old table name * @param string the new table name * @return string */ - function _rename_table($table_name, $new_table_name) + protected function _rename_table($table_name, $new_table_name) { return 'RENAME TABLE '.$this->db->protect_identifiers($table_name).' AS '.$this->db->protect_identifiers($new_table_name); } diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php index a7eeb8a39..c7a7632aa 100644 --- a/system/database/drivers/cubrid/cubrid_result.php +++ b/system/database/drivers/cubrid/cubrid_result.php @@ -41,10 +41,9 @@ class CI_DB_cubrid_result extends CI_DB_result { /** * Number of rows in the result set * - * @access public * @return integer */ - function num_rows() + public function num_rows() { return @cubrid_num_rows($this->result_id); } @@ -54,10 +53,9 @@ class CI_DB_cubrid_result extends CI_DB_result { /** * Number of fields in the result set * - * @access public * @return integer */ - function num_fields() + public function num_fields() { return @cubrid_num_fields($this->result_id); } @@ -69,10 +67,9 @@ class CI_DB_cubrid_result extends CI_DB_result { * * Generates an array of column names * - * @access public * @return array */ - function list_fields() + public function list_fields() { return cubrid_column_names($this->result_id); } @@ -84,10 +81,9 @@ class CI_DB_cubrid_result extends CI_DB_result { * * Generates an array of objects containing field meta-data * - * @access public * @return array */ - function field_data() + public function field_data() { $retval = array(); @@ -149,7 +145,7 @@ class CI_DB_cubrid_result extends CI_DB_result { * * @return null */ - function free_result() + public function free_result() { if(is_resource($this->result_id) || get_resource_type($this->result_id) == "Unknown" && @@ -169,10 +165,9 @@ class CI_DB_cubrid_result extends CI_DB_result { * this internally before fetching results to make sure the * result set starts at zero * - * @access private * @return array */ - function _data_seek($n = 0) + protected function _data_seek($n = 0) { return cubrid_data_seek($this->result_id, $n); } @@ -184,10 +179,9 @@ class CI_DB_cubrid_result extends CI_DB_result { * * Returns the result set as an array * - * @access private * @return array */ - function _fetch_assoc() + protected function _fetch_assoc() { return cubrid_fetch_assoc($this->result_id); } @@ -199,10 +193,9 @@ class CI_DB_cubrid_result extends CI_DB_result { * * Returns the result set as an object * - * @access private * @return object */ - function _fetch_object() + protected function _fetch_object() { return cubrid_fetch_object($this->result_id); } diff --git a/system/database/drivers/cubrid/cubrid_utility.php b/system/database/drivers/cubrid/cubrid_utility.php index a13c0a5e4..de28e6335 100644 --- a/system/database/drivers/cubrid/cubrid_utility.php +++ b/system/database/drivers/cubrid/cubrid_utility.php @@ -42,7 +42,7 @@ class CI_DB_cubrid_utility extends CI_DB_utility { * @access private * @return array */ - function _list_databases() + protected function _list_databases() { // CUBRID does not allow to see the list of all databases on the // server. It is the way its architecture is designed. Every @@ -71,7 +71,7 @@ class CI_DB_cubrid_utility extends CI_DB_utility { * @return object * @link http://www.cubrid.org/manual/840/en/Optimize%20Database */ - function _optimize_table($table) + protected function _optimize_table($table) { // No SQL based support in CUBRID as of version 8.4.0. Database or // table optimization can be performed using CUBRID Manager @@ -91,7 +91,7 @@ class CI_DB_cubrid_utility extends CI_DB_utility { * @return object * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency */ - function _repair_table($table) + protected function _repair_table($table) { // Not supported in CUBRID as of version 8.4.0. Database or // table consistency can be checked using CUBRID Manager @@ -107,7 +107,7 @@ class CI_DB_cubrid_utility extends CI_DB_utility { * @param array Preferences * @return mixed */ - function _backup($params = array()) + protected function _backup($params = array()) { // No SQL based support in CUBRID as of version 8.4.0. Database or // table backup can be performed using CUBRID Manager -- cgit v1.2.3-24-g4f1b