summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2010-11-10 22:26:43 +0100
committerGreg Aker <greg.aker@ellislab.com>2010-11-10 22:26:43 +0100
commita926328583e7ffdaaac7daf2f87810d842423f21 (patch)
tree7e4b62b3029de2a7273ab94d30148a60e496ada7 /system/libraries
parent579fde36e4f8cc294edec4fd4eefe06f4df09dda (diff)
Changing all class constructors to __construct()
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Calendar.php4
-rw-r--r--system/libraries/Cart.php2
-rw-r--r--system/libraries/Driver.php9
-rw-r--r--system/libraries/Email.php2
-rw-r--r--system/libraries/Encrypt.php2
-rw-r--r--system/libraries/Form_validation.php3
-rw-r--r--system/libraries/Ftp.php2
-rw-r--r--system/libraries/Image_lib.php3
-rw-r--r--system/libraries/Javascript.php2
-rw-r--r--system/libraries/Log.php4
-rw-r--r--system/libraries/Pagination.php2
-rw-r--r--system/libraries/Parser.php2
-rw-r--r--system/libraries/Security.php2
-rw-r--r--system/libraries/Session.php2
-rw-r--r--system/libraries/Sha1.php2
-rw-r--r--system/libraries/Table.php2
-rw-r--r--system/libraries/Trackback.php2
-rw-r--r--system/libraries/Typography.php8
-rw-r--r--system/libraries/Unit_test.php2
-rw-r--r--system/libraries/User_agent.php2
-rw-r--r--system/libraries/Xmlrpc.php16
-rw-r--r--system/libraries/Xmlrpcs.php12
-rw-r--r--system/libraries/Zip.php5
-rw-r--r--system/libraries/javascript/Jquery.php2
24 files changed, 39 insertions, 55 deletions
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 752ce254b..59025cf55 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -42,10 +42,8 @@ class CI_Calendar {
* Constructor
*
* Loads the calendar language file and sets the default time reference
- *
- * @access public
*/
- function CI_Calendar($config = array())
+ public function __construct($config = array())
{
$this->CI =& get_instance();
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index f2121bcac..5d3f91d43 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -40,7 +40,7 @@ class CI_Cart {
*
* The constructor loads the Session class, used to store the shopping cart contents.
*/
- function CI_Cart($params = array())
+ public function __construct($params = array())
{
// Set the super object to a local variable for use later
$this->CI =& get_instance();
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 2eb9c1e5e..8579a6023 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -119,11 +119,10 @@ class CI_Driver {
*
* Decorates the child with the parent driver lib's methods and properties
*
- * @access public
* @param object
* @return void
*/
- function decorate($parent)
+ public function decorate($parent)
{
$this->parent = $parent;
@@ -191,11 +190,10 @@ class CI_Driver {
*
* Handles reading of the parent driver library's properties
*
- * @access public
* @param string
* @return mixed
*/
- function __get($var)
+ public function __get($var)
{
if (in_array($var, $this->properties))
{
@@ -210,12 +208,11 @@ class CI_Driver {
*
* Handles writing to the parent driver library's properties
*
- * @access public
* @param string
* @param array
* @return mixed
*/
- function __set($var, $val)
+ public function __set($var, $val)
{
if (in_array($var, $this->properties))
{
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fbf494d32..a09ca5882 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -82,7 +82,7 @@ class CI_Email {
*
* The constructor can be passed an array of config values
*/
- function CI_Email($config = array())
+ function __construct($config = array())
{
if (count($config) > 0)
{
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index f64c10c5d..7682f21e4 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -41,7 +41,7 @@ class CI_Encrypt {
* Simply determines whether the mcrypt library exists.
*
*/
- function CI_Encrypt()
+ public function __construct()
{
$this->CI =& get_instance();
$this->_mcrypt_exists = ( ! function_exists('mcrypt_encrypt')) ? FALSE : TRUE;
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index cab6f34fd..d62071b79 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -39,9 +39,8 @@ class CI_Form_validation {
/**
* Constructor
- *
*/
- function CI_Form_validation($rules = array())
+ public function __construct($rules = array())
{
$this->CI =& get_instance();
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 4cf95ee0e..6ffbef177 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -40,7 +40,7 @@ class CI_FTP {
*
* The constructor can be passed an array of config values
*/
- function CI_FTP($config = array())
+ public function __construct($config = array())
{
if (count($config) > 0)
{
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index dec5f34f6..84c41c4ee 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -79,11 +79,10 @@ class CI_Image_lib {
/**
* Constructor
*
- * @access public
* @param string
* @return void
*/
- function CI_Image_lib($props = array())
+ public function __construct($props = array())
{
if (count($props) > 0)
{
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 8b7efd2c4..6fe365f05 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -28,7 +28,7 @@ class CI_Javascript {
var $_javascript_location = 'js';
- function CI_Javascript($params = array())
+ public function __construct($params = array())
{
$defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE);
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index d4a687191..6d44cfa4b 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -34,10 +34,8 @@ class CI_Log {
/**
* Constructor
- *
- * @access public
*/
- function CI_Log()
+ public function __construct()
{
$config =& get_config();
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index e5a59ed76..47b718bd2 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -65,7 +65,7 @@ class CI_Pagination {
* @access public
* @param array initialization parameters
*/
- function CI_Pagination($params = array())
+ public function __construct($params = array())
{
if (count($params) > 0)
{
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index f7320c5a0..5d9203a91 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.php
@@ -42,7 +42,7 @@ class CI_Parser {
* @param bool
* @return string
*/
- function parse($template, $data, $return = FALSE)
+ public function __construct($template, $data, $return = FALSE)
{
$CI =& get_instance();
$template = $CI->load->view($template, $data, TRUE);
diff --git a/system/libraries/Security.php b/system/libraries/Security.php
index 0fa1428be..d2638560c 100644
--- a/system/libraries/Security.php
+++ b/system/libraries/Security.php
@@ -51,7 +51,7 @@ class CI_Security {
"Redirect\s+302" => '[removed]'
);
- function CI_Security()
+ public function __construct()
{
// Append application specific cookie prefix to token name
$this->csrf_cookie_name = (config_item('cookie_prefix')) ? config_item('cookie_prefix').$this->csrf_token_name : $this->csrf_token_name;
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index e7842d847..4dccc46c9 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -52,7 +52,7 @@ class CI_Session {
* The constructor runs the session routines automatically
* whenever the class is instantiated.
*/
- function CI_Session($params = array())
+ public function __construct($params = array())
{
log_message('debug', "Session Class Initialized");
diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php
index d9f0e3952..a5addd00c 100644
--- a/system/libraries/Sha1.php
+++ b/system/libraries/Sha1.php
@@ -44,7 +44,7 @@
*/
class CI_SHA {
- function CI_SHA()
+ public function __construct()
{
log_message('debug', "SHA1 Class Initialized");
}
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 82d0a3e9d..a57781c29 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -37,7 +37,7 @@ class CI_Table {
var $empty_cells = "";
var $function = FALSE;
- function CI_Table()
+ public function __construct()
{
log_message('debug', "Table Class Initialized");
}
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index c2350947a..79f512b26 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -40,7 +40,7 @@ class CI_Trackback {
*
* @access public
*/
- function CI_Trackback()
+ public function __construct()
{
log_message('debug', "Trackback Class Initialized");
}
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index e08708562..2ea25e48b 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -45,14 +45,6 @@ class CI_Typography {
var $protect_braced_quotes = FALSE;
/**
- * Nothing to do here...
- *
- */
- function CI_Typography()
- {
- }
-
- /**
* Auto Typography
*
* This function converts text, making it typographically correct:
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index 2f6067b5e..a57934cd2 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -35,7 +35,7 @@ class CI_Unit_test {
var $_template_rows = NULL;
var $_test_items_visible = array();
- function CI_Unit_test()
+ public function __construct()
{
// These are the default items visible when a test is run.
$this->_test_items_visible = array (
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index a780ec231..c1fb0231a 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -56,7 +56,7 @@ class CI_User_agent {
* @access public
* @return void
*/
- function CI_User_agent()
+ public function __construct()
{
if (isset($_SERVER['HTTP_USER_AGENT']))
{
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index 44cdffecd..3ae5bad45 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -69,7 +69,7 @@ class CI_Xmlrpc {
// VALUES THAT MULTIPLE CLASSES NEED
//-------------------------------------
- function CI_Xmlrpc ($config = array())
+ public function __construct($config = array())
{
$this->xmlrpcName = $this->xmlrpcName;
$this->xmlrpc_backslash = chr(92).chr(92);
@@ -360,9 +360,9 @@ class XML_RPC_Client extends CI_Xmlrpc
var $timeout = 5;
var $no_multicall = false;
- function XML_RPC_Client($path, $server, $port=80)
+ public function __construct($path, $server, $port=80)
{
- parent::CI_Xmlrpc();
+ parent::__construct();
$this->port = $port;
$this->server = $server;
@@ -436,7 +436,7 @@ class XML_RPC_Response
var $headers = array();
var $xss_clean = TRUE;
- function XML_RPC_Response($val, $code = 0, $fstr = '')
+ public function __construct($val, $code = 0, $fstr = '')
{
if ($code != 0)
{
@@ -621,9 +621,9 @@ class XML_RPC_Message extends CI_Xmlrpc
var $params = array();
var $xh = array();
- function XML_RPC_Message($method, $pars=0)
+ public function __construct($method, $pars=0)
{
- parent::CI_Xmlrpc();
+ parent::__construct();
$this->method_name = $method;
if (is_array($pars) && count($pars) > 0)
@@ -1223,9 +1223,9 @@ class XML_RPC_Values extends CI_Xmlrpc
var $me = array();
var $mytype = 0;
- function XML_RPC_Values($val=-1, $type='')
+ public function __construct($val=-1, $type='')
{
- parent::CI_Xmlrpc();
+ parent::__construct();
if ($val != -1 OR $type != '')
{
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index 14e10d22c..555ec7495 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -43,14 +43,12 @@ class CI_Xmlrpcs extends CI_Xmlrpc
var $object = FALSE;
-
- //-------------------------------------
- // Constructor, more or less
- //-------------------------------------
-
- function CI_Xmlrpcs($config=array())
+ /**
+ * Constructor
+ */
+ public function __construct($config=array())
{
- parent::CI_Xmlrpc();
+ parent::__construct();
$this->set_system_methods();
if (isset($config['functions']) && is_array($config['functions']))
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index aa5cf13b0..94da4b3b8 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -39,7 +39,10 @@ class CI_Zip {
var $offset = 0;
var $now;
- function CI_Zip()
+ /**
+ * Constructor
+ */
+ public function __construct()
{
log_message('debug', "Zip Compression Class Initialized");
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index db80c1428..91148dca5 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -34,7 +34,7 @@ class CI_Jquery extends CI_Javascript {
var $jquery_table_sorter_pager_active = FALSE;
var $jquery_ajax_img = '';
- function Jquery($params)
+ public function __construct($params)
{
$this->CI =& get_instance();
extract($params);