summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Driver.php3
-rw-r--r--system/libraries/Email.php20
-rw-r--r--system/libraries/Ftp.php7
-rw-r--r--system/libraries/Javascript.php32
-rw-r--r--system/libraries/Trackback.php5
-rw-r--r--system/libraries/Unit_test.php34
-rw-r--r--system/libraries/Upload.php4
-rwxr-xr-xsystem/libraries/Xmlrpc.php14
-rw-r--r--system/libraries/javascript/Jquery.php83
9 files changed, 137 insertions, 65 deletions
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 769d892dc..5d642b982 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -172,7 +172,8 @@ class CI_Driver {
/**
* Array of methods and properties for the parent class(es)
*
- * @var array
+ * @static
+ * @var array
*/
protected static $_reflections = array();
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index c1130e915..83b442f58 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -94,6 +94,7 @@ class CI_Email {
*
* The constructor can be passed an array of config values
*
+ * @param array $config = array()
* @return void
*/
public function __construct($config = array())
@@ -188,8 +189,9 @@ class CI_Email {
/**
* Set FROM
*
- * @param string From
- * @param string Return-Path
+ * @param string $from
+ * @param string $name
+ * @param string $return_path = NULL Return-Path
* @return object
*/
public function from($from, $name = '', $return_path = NULL)
@@ -405,7 +407,10 @@ class CI_Email {
/**
* Assign file attachments
*
- * @param string
+ * @param string $filename
+ * @param string $disposition = 'attachment'
+ * @param string $newname = NULL
+ * @param string $mime = ''
* @return object
*/
public function attach($filename, $disposition = '', $newname = NULL, $mime = '')
@@ -1256,6 +1261,7 @@ class CI_Email {
/**
* Send Email
*
+ * @param bool $auto_clear = TRUE
* @return bool
*/
public function send($auto_clear = TRUE)
@@ -1368,6 +1374,7 @@ class CI_Email {
/**
* Strip line-breaks via callback
*
+ * @param string $matches
* @return string
*/
protected function _remove_nl_callback($matches)
@@ -1535,7 +1542,6 @@ class CI_Email {
/**
* SMTP Connect
*
- * @param string
* @return string
*/
protected function _smtp_connect()
@@ -1710,11 +1716,12 @@ class CI_Email {
/**
* Send SMTP data
*
+ * @param string $data
* @return bool
*/
protected function _send_data($data)
{
- if ( ! fwrite($this->_smtp_connect, $data . $this->newline))
+ if ( ! fwrite($this->_smtp_connect, $data.$this->newline))
{
$this->_set_error_message('lang:email_smtp_data_failure', $data);
return FALSE;
@@ -1786,7 +1793,8 @@ class CI_Email {
/**
* Set Message
*
- * @param string
+ * @param string $msg
+ * @param string $val = ''
* @return void
*/
protected function _set_error_message($msg, $val = '')
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 76f5e151a..ae85fdf37 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -44,6 +44,12 @@ class CI_FTP {
public $debug = FALSE;
public $conn_id = FALSE;
+ /**
+ * Constructor
+ *
+ * @param array $config = array()
+ * @return void
+ */
public function __construct($config = array())
{
if (count($config) > 0)
@@ -474,6 +480,7 @@ class CI_FTP {
/**
* FTP List files in the specified directory
*
+ * @param string $path = '.'
* @return array
*/
public function list_files($path = '.')
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 5c8b09217..60309cd83 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -38,6 +38,12 @@ class CI_Javascript {
protected $_javascript_location = 'js';
+ /**
+ * Constructor
+ *
+ * @param array $params = array()
+ * @return void
+ */
public function __construct($params = array())
{
$defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE);
@@ -312,8 +318,7 @@ class CI_Javascript {
*
* Outputs a javascript library mouseup event
*
- * @param string The element to attach the event to
- * @param string The code to execute
+ * @param string $js Code to execute
* @return string
*/
public function ready($js)
@@ -394,9 +399,10 @@ class CI_Javascript {
*
* Outputs a javascript library animate event
*
- * @param string - element
- * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
- * @param string - Javascript callback function
+ * @param string $element = 'this'
+ * @param array $params = array()
+ * @param mixed $speed 'slow', 'normal', 'fast', or time in milliseconds
+ * @param string $extra
* @return string
*/
public function animate($element = 'this', $params = array(), $speed = '', $extra = '')
@@ -546,10 +552,11 @@ class CI_Javascript {
*
* Outputs a javascript library toggle class event
*
- * @param string - element
+ * @param string $element = 'this'
+ * @param string $class = ''
* @return string
*/
- public function toggleClass($element = 'this', $class='')
+ public function toggleClass($element = 'this', $class = '')
{
return $this->js->_toggleClass($element, $class);
}
@@ -579,7 +586,8 @@ class CI_Javascript {
*
* gather together all script needing to be output
*
- * @param string The element to attach the event to
+ * @param string $view_var = 'script_foot'
+ * @param bool $script_tags = TRUE
* @return string
*/
public function compile($view_var = 'script_foot', $script_tags = TRUE)
@@ -587,6 +595,8 @@ class CI_Javascript {
$this->js->_compile($view_var, $script_tags);
}
+ // --------------------------------------------------------------------
+
/**
* Clear Compile
*
@@ -606,7 +616,8 @@ class CI_Javascript {
*
* Outputs a <script> tag with the source as an external js file
*
- * @param string The element to attach the event to
+ * @param string $external_file = ''
+ * @param bool $relative = FALSE
* @return string
*/
public function external($external_file = '', $relative = FALSE)
@@ -799,7 +810,8 @@ class CI_Javascript {
*
* Ensures a standard json value and escapes values
*
- * @param mixed
+ * @param mixed $result
+ * @param bool $is_key = FALSE
* @return string
*/
protected function _prep_args($result, $is_key = FALSE)
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index 9a680dc2a..7bd7cba04 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -45,6 +45,11 @@ class CI_Trackback {
public $response = '';
public $error_msg = array();
+ /**
+ * Constructor
+ *
+ * @return void
+ */
public function __construct()
{
log_message('debug', 'Trackback Class Initialized');
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index c2c01758e..7b99dee0d 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -38,13 +38,18 @@
*/
class CI_Unit_test {
- public $active = TRUE;
- public $results = array();
- public $strict = FALSE;
- protected $_template = NULL;
- protected $_template_rows = NULL;
+ public $active = TRUE;
+ public $results = array();
+ public $strict = FALSE;
+ protected $_template = NULL;
+ protected $_template_rows = NULL;
protected $_test_items_visible = array();
+ /**
+ * Constructor
+ *
+ * @return void
+ */
public function __construct()
{
// These are the default items visible when a test is run.
@@ -86,9 +91,10 @@ class CI_Unit_test {
*
* Runs the supplied tests
*
- * @param mixed
- * @param mixed
- * @param string
+ * @param mixed $test
+ * @param mixed $expected = TRUE
+ * @param string $test_name = 'undefined'
+ * @param string $notes = ''
* @return string
*/
public function run($test, $expected = TRUE, $test_name = 'undefined', $notes = '')
@@ -134,6 +140,7 @@ class CI_Unit_test {
*
* Displays a table with the test data
*
+ * @param array $result = array()
* @return string
*/
public function report($result = array())
@@ -213,6 +220,7 @@ class CI_Unit_test {
*
* Returns the raw result data
*
+ * @param array $results = array()
* @return array
*/
public function result($results = array())
@@ -345,14 +353,22 @@ class CI_Unit_test {
}
/**
- * Helper functions to test boolean true/false
+ * Helper function to test boolean TRUE
*
+ * @param mixed $test
* @return bool
*/
function is_true($test)
{
return ($test === TRUE);
}
+
+/**
+ * Helper function to test boolean FALSE
+ *
+ * @param mixed $test
+ * @return bool
+ */
function is_false($test)
{
return ($test === FALSE);
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index d381440cd..76bbc244e 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -154,6 +154,7 @@ class CI_Upload {
/**
* Perform the file upload
*
+ * @param string $field = 'userfile'
* @return bool
*/
public function do_upload($field = 'userfile')
@@ -790,7 +791,8 @@ class CI_Upload {
/**
* Limit the File Name Length
*
- * @param string
+ * @param string $filename
+ * @param int $length
* @return string
*/
public function limit_filename_length($filename, $length)
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index dc5d27f8c..3ed050a2e 100755
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -170,8 +170,10 @@ class CI_Xmlrpc {
/**
* Parse server URL
*
- * @param string url
- * @param int port
+ * @param string $url
+ * @param int $port = 80
+ * @param string $proxy = FALSE
+ * @param int $proxy_port = 8080
* @return void
*/
public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
@@ -395,9 +397,11 @@ class XML_RPC_Client extends CI_Xmlrpc
/**
* Constructor
*
- * @param string
- * @param object
- * @param int
+ * @param string $path
+ * @param object $server
+ * @param int $port = 80
+ * @param string $proxy = FALSE
+ * @param int $proxy_port = 8080
* @return void
*/
public function __construct($path, $server, $port = 80, $proxy = FALSE, $proxy_port = 8080)
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index 44c16b578..8739d141f 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -34,7 +34,6 @@
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/javascript.html
*/
-
class CI_Jquery extends CI_Javascript {
protected $_javascript_folder = 'js';
@@ -45,6 +44,12 @@ class CI_Jquery extends CI_Javascript {
public $jquery_table_sorter_pager_active = FALSE;
public $jquery_ajax_img = '';
+ /**
+ * Constructor
+ *
+ * @param array $params
+ * @return void
+ */
public function __construct($params)
{
$this->CI =& get_instance();
@@ -101,15 +106,12 @@ class CI_Jquery extends CI_Javascript {
*
* @param string The element to attach the event to
* @param string The code to execute
- * @param boolean whether or not to return false
+ * @param bool whether or not to return false
* @return string
*/
protected function _click($element = 'this', $js = '', $ret_false = TRUE)
{
- if ( ! is_array($js))
- {
- $js = array($js);
- }
+ is_array($js) OR $js = array($js);
if ($ret_false)
{
@@ -307,11 +309,10 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs script directly
*
- * @param string The element to attach the event to
- * @param string The code to execute
- * @return string
+ * @param array $array_js = array()
+ * @return void
*/
- protected function _output($array_js = '')
+ protected function _output($array_js = array())
{
if ( ! is_array($array_js))
{
@@ -381,10 +382,11 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery addClass event
*
- * @param string - element
+ * @param string $element = 'this'
+ * @param string $class = ''
* @return string
*/
- protected function _addClass($element = 'this', $class='')
+ protected function _addClass($element = 'this', $class = '')
{
$element = $this->_prep_element($element);
return '$('.$element.').addClass("'.$class.'");';
@@ -397,9 +399,10 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery animate event
*
- * @param string - element
- * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
- * @param string - Javascript callback function
+ * @param string $element = 'this'
+ * @param array $params = array()
+ * @param string $speed = '' 'slow', 'normal', 'fast', or time in milliseconds
+ * @param string $extra = ''
* @return string
*/
protected function _animate($element = 'this', $params = array(), $speed = '', $extra = '')
@@ -511,10 +514,11 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery remove class event
*
- * @param string - element
+ * @param string $element = 'this'
+ * @param string $class = ''
* @return string
*/
- protected function _removeClass($element = 'this', $class='')
+ protected function _removeClass($element = 'this', $class = '')
{
$element = $this->_prep_element($element);
return '$('.$element.').removeClass("'.$class.'");';
@@ -618,10 +622,11 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery toggle class event
*
- * @param string - element
+ * @param string $element = 'this'
+ * @param string $class = ''
* @return string
*/
- protected function _toggleClass($element = 'this', $class='')
+ protected function _toggleClass($element = 'this', $class = '')
{
$element = $this->_prep_element($element);
return '$('.$element.').toggleClass("'.$class.'");';
@@ -703,8 +708,9 @@ class CI_Jquery extends CI_Javascript {
/**
* Zebra tables
*
- * @param string table name
- * @param string plugin location
+ * @param string $class = ''
+ * @param string $odd = 'odd'
+ * @param string $hover = ''
* @return string
*/
protected function _zebraTables($class = '', $odd = 'odd', $hover = '')
@@ -731,7 +737,8 @@ class CI_Jquery extends CI_Javascript {
*
* http://www.malsup.com/jquery/corner/
*
- * @param string target
+ * @param string $element = ''
+ * @param string $corner_style = ''
* @return string
*/
public function corner($element = '', $corner_style = '')
@@ -750,10 +757,12 @@ class CI_Jquery extends CI_Javascript {
// --------------------------------------------------------------------
/**
- * modal window
+ * Modal window
*
* Load a thickbox modal window
*
+ * @param string $src
+ * @param bool $relative = FALSE
* @return void
*/
public function modal($src, $relative = FALSE)
@@ -768,6 +777,8 @@ class CI_Jquery extends CI_Javascript {
*
* Load an Effect library
*
+ * @param string $src
+ * @param bool $relative = FALSE
* @return void
*/
public function effect($src, $relative = FALSE)
@@ -782,6 +793,8 @@ class CI_Jquery extends CI_Javascript {
*
* Load a plugin library
*
+ * @param string $src
+ * @param bool $relative = FALSE
* @return void
*/
public function plugin($src, $relative = FALSE)
@@ -796,12 +809,15 @@ class CI_Jquery extends CI_Javascript {
*
* Load a user interface library
*
+ * @param string $src
+ * @param bool $relative = FALSE
* @return void
*/
public function ui($src, $relative = FALSE)
{
$this->jquery_code_for_load[] = $this->external($src, $relative);
}
+
// --------------------------------------------------------------------
/**
@@ -809,11 +825,12 @@ class CI_Jquery extends CI_Javascript {
*
* Creates a jQuery sortable
*
- * @return void
+ * @param string $element
+ * @param array $options = array()
+ * @return string
*/
public function sortable($element, $options = array())
{
-
if (count($options) > 0)
{
$sort_options = array();
@@ -880,7 +897,9 @@ class CI_Jquery extends CI_Javascript {
* As events are specified, they are stored in an array
* This funciton compiles them all for output on a page
*
- * @return string
+ * @param string $view_var = 'script_foot'
+ * @param bool $script_tags = TRUE
+ * @return void
*/
protected function _compile($view_var = 'script_foot', $script_tags = TRUE)
{
@@ -902,7 +921,6 @@ class CI_Jquery extends CI_Javascript {
$output = ($script_tags === FALSE) ? $script : $this->inline($script);
$this->CI->load->vars(array($view_var => $output));
-
}
// --------------------------------------------------------------------
@@ -926,14 +944,12 @@ class CI_Jquery extends CI_Javascript {
*
* A wrapper for writing document.ready()
*
- * @return string
+ * @param array $js
+ * @return void
*/
protected function _document_ready($js)
{
- if ( ! is_array($js))
- {
- $js = array($js);
- }
+ is_array($js) OR $js = array($js);
foreach ($js as $script)
{
@@ -948,7 +964,8 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs the script tag that loads the jquery.js file into an HTML document
*
- * @param string
+ * @param string $library_src = ''
+ * @param bool $relative = FALSE
* @return string
*/
public function script($library_src = '', $relative = FALSE)