summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-01 22:33:14 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-01 22:33:14 +0100
commit0fa95bd5a7215da06f332c91f5857f563a1cce3d (patch)
tree3159604fe8f745b41059963396ced01526912a50 /system/libraries
parent597ea27a0660bdf72f84d74566cc842e4da37efd (diff)
[ci skip] DocBlocks for Pagination, Session, Trackback, Jquery libraries
Partially fixes issue #1295
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Pagination.php295
-rwxr-xr-xsystem/libraries/Session/Session.php29
-rw-r--r--system/libraries/Trackback.php41
-rw-r--r--system/libraries/javascript/Jquery.php94
4 files changed, 393 insertions, 66 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 4cb72bbfb..ae8dba072 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -37,46 +37,269 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_Pagination {
- protected $base_url = ''; // The page we are linking to
- protected $prefix = ''; // A custom prefix added to the path.
- protected $suffix = ''; // A custom suffix added to the path.
- protected $total_rows = 0; // Total number of items (database results)
- protected $per_page = 10; // Max number of items you want shown per page
- protected $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
- protected $cur_page = 0; // The current page being viewed
- protected $use_page_numbers = FALSE; // Use page number for segment instead of offset
- protected $first_link = '&lsaquo; First';
- protected $next_link = '&gt;';
- protected $prev_link = '&lt;';
- protected $last_link = 'Last &rsaquo;';
- protected $uri_segment = 3;
- protected $full_tag_open = '';
- protected $full_tag_close = '';
- protected $first_tag_open = '';
- protected $first_tag_close = '';
- protected $last_tag_open = '';
- protected $last_tag_close = '';
- protected $first_url = ''; // Alternative URL for the First Page.
- protected $cur_tag_open = '<strong>';
- protected $cur_tag_close = '</strong>';
- protected $next_tag_open = '';
- protected $next_tag_close = '';
- protected $prev_tag_open = '';
- protected $prev_tag_close = '';
- protected $num_tag_open = '';
- protected $num_tag_close = '';
+ /**
+ * Base URL
+ *
+ * The page that we're linking to
+ *
+ * @var string
+ */
+ protected $base_url = '';
+
+ /**
+ * Prefix
+ *
+ * @var string
+ */
+ protected $prefix = '';
+
+ /**
+ * Suffix
+ *
+ * @var string
+ */
+ protected $suffix = '';
+
+ /**
+ * Total number of items
+ *
+ * @var int
+ */
+ protected $total_rows = 0;
+
+ /**
+ * Items per page
+ *
+ * @var int
+ */
+ protected $per_page = 10;
+
+ /**
+ * Number of links to show
+ *
+ * Relates to "digit" type links shown before/after
+ * the currently viewed page.
+ *
+ * @var int
+ */
+ protected $num_links = 2;
+
+ /**
+ * Current page
+ *
+ * @var int
+ */
+ protected $cur_page = 0;
+
+ /**
+ * Use page numbers flag
+ *
+ * Whether to use actual page numbers instead of an offset
+ *
+ * @var bool
+ */
+ protected $use_page_numbers = FALSE;
+
+ /**
+ * First link
+ *
+ * @var string
+ */
+ protected $first_link = '&lsaquo; First';
+
+ /**
+ * Next link
+ *
+ * @var string
+ */
+ protected $next_link = '&gt;';
+
+ /**
+ * Previous link
+ *
+ * @var string
+ */
+ protected $prev_link = '&lt;';
+
+ /**
+ * Last link
+ *
+ * @var string
+ */
+ protected $last_link = 'Last &rsaquo;';
+
+ /**
+ * URI Segment
+ *
+ * @var int
+ */
+ protected $uri_segment = 3;
+
+ /**
+ * Full tag open
+ *
+ * @var string
+ */
+ protected $full_tag_open = '';
+
+ /**
+ * Full tag close
+ *
+ * @var string
+ */
+ protected $full_tag_close = '';
+
+ /**
+ * First tag open
+ *
+ * @var string
+ */
+ protected $first_tag_open = '';
+
+ /**
+ * First tag close
+ *
+ * @var string
+ */
+ protected $first_tag_close = '';
+
+ /**
+ * Last tag open
+ *
+ * @var string
+ */
+ protected $last_tag_open = '';
+
+ /**
+ * Last tag close
+ *
+ * @var string
+ */
+ protected $last_tag_close = '';
+
+ /**
+ * First URL
+ *
+ * An alternative URL for the first page
+ *
+ * @var string
+ */
+ protected $first_url = '';
+
+ /**
+ * Current tag open
+ *
+ * @var string
+ */
+ protected $cur_tag_open = '<strong>';
+
+ /**
+ * Current tag close
+ *
+ * @var string
+ */
+ protected $cur_tag_close = '</strong>';
+
+ /**
+ * Next tag open
+ *
+ * @var string
+ */
+ protected $next_tag_open = '';
+
+ /**
+ * Next tag close
+ *
+ * @var string
+ */
+ protected $next_tag_close = '';
+
+ /**
+ * Previous tag open
+ *
+ * @var string
+ */
+ protected $prev_tag_open = '';
+
+ /**
+ * Previous tag close
+ *
+ * @var string
+ */
+ protected $prev_tag_close = '';
+
+ /**
+ * Number tag open
+ *
+ * @var string
+ */
+ protected $num_tag_open = '';
+
+ /**
+ * Number tag close
+ *
+ * @var string
+ */
+ protected $num_tag_close = '';
+
+ /**
+ * Page query string flag
+ *
+ * @var bool
+ */
protected $page_query_string = FALSE;
+
+ /**
+ * Query string segment
+ *
+ * @var string
+ */
protected $query_string_segment = 'per_page';
- protected $display_pages = TRUE;
- protected $_attributes = '';
- protected $_link_types = array();
+
+ /**
+ * Display pages flag
+ *
+ * @var bool
+ */
+ protected $display_pages = TRUE;
+
+ /**
+ * Attributes
+ *
+ * @var string
+ */
+ protected $_attributes = '';
+
+ /**
+ * Link types
+ *
+ * "rel" attribute
+ *
+ * @see CI_Pagination::_attr_rel()
+ * @var array
+ */
+ protected $_link_types = array();
+
+ /**
+ * Reuse query string flag
+ *
+ * @var bool
+ */
protected $reuse_query_string = FALSE;
- protected $data_page_attr = 'data-ci-pagination-page';
+
+ /**
+ * Data page attribute
+ *
+ * @var string
+ */
+ protected $data_page_attr = 'data-ci-pagination-page';
+
+ // --------------------------------------------------------------------
/**
* Constructor
*
- * @param array initialization parameters
+ * @param array $params Initialization parameters
* @return void
*/
public function __construct($params = array())
@@ -90,7 +313,7 @@ class CI_Pagination {
/**
* Initialize Preferences
*
- * @param array initialization parameters
+ * @param array $params Initialization parameters
* @return void
*/
public function initialize($params = array())
@@ -353,7 +576,7 @@ class CI_Pagination {
/**
* Parse attributes
*
- * @param array
+ * @param array $attributes
* @return void
*/
protected function _parse_attributes($attributes)
@@ -377,7 +600,7 @@ class CI_Pagination {
* Add "rel" attribute
*
* @link http://www.w3.org/TR/html5/links.html#linkTypes
- * @param string
+ * @param string $type
* @return string
*/
protected function _attr_rel($type)
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index fb5b9fdd3..bb13c3376 100755
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -52,10 +52,29 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_Session extends CI_Driver_Library {
+ /**
+ * Initialization parameters
+ *
+ * @var array
+ */
public $params = array();
+
+ /**
+ * Current driver in use
+ *
+ * @var string
+ */
protected $current = NULL;
+
+ /**
+ * User data
+ *
+ * @var array
+ */
protected $userdata = array();
+ // ------------------------------------------------------------------------
+
const FLASHDATA_KEY = 'flash';
const FLASHDATA_NEW = ':new:';
const FLASHDATA_OLD = ':old:';
@@ -63,6 +82,8 @@ class CI_Session extends CI_Driver_Library {
const EXPIRATION_KEY = '__expirations';
const TEMP_EXP_DEF = 300;
+ // ------------------------------------------------------------------------
+
/**
* CI_Session constructor
*
@@ -596,8 +617,16 @@ class CI_Session extends CI_Driver_Library {
*/
abstract class CI_Session_driver extends CI_Driver {
+ /**
+ * CI Singleton
+ *
+ * @see get_instance()
+ * @var object
+ */
protected $CI;
+ // ------------------------------------------------------------------------
+
/**
* Constructor
*
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index ac74f3632..c923a6220 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -39,12 +39,45 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_Trackback {
- public $time_format = 'local';
+ /**
+ * Character set
+ *
+ * @var string
+ */
public $charset = 'UTF-8';
- public $data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '');
+
+ /**
+ * Trackback data
+ *
+ * @var array
+ */
+ public $data = array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '');
+
+ /**
+ * Convert ASCII flag
+ *
+ * Whether to convert high-ASCII and MS Word
+ * characters to HTML entities.
+ *
+ * @var bool
+ */
public $convert_ascii = TRUE;
- public $response = '';
- public $error_msg = array();
+
+ /**
+ * Response
+ *
+ * @var string
+ */
+ public $response = '';
+
+ /**
+ * Error messages list
+ *
+ * @var string[]
+ */
+ public $error_msg = array();
+
+ // --------------------------------------------------------------------
/**
* Constructor
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index 13f6c8057..2bf47957f 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -37,14 +37,57 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_Jquery extends CI_Javascript {
+ /**
+ * JavaScript directory location
+ *
+ * @var string
+ */
protected $_javascript_folder = 'js';
+
+ /**
+ * JQuery code for load
+ *
+ * @var array
+ */
public $jquery_code_for_load = array();
+
+ /**
+ * JQuery code for compile
+ *
+ * @var array
+ */
public $jquery_code_for_compile = array();
+
+ /**
+ * JQuery corner active flag
+ *
+ * @var bool
+ */
public $jquery_corner_active = FALSE;
+
+ /**
+ * JQuery table sorter active flag
+ *
+ * @var bool
+ */
public $jquery_table_sorter_active = FALSE;
+
+ /**
+ * JQuery table sorder pager active
+ *
+ * @var bool
+ */
public $jquery_table_sorter_pager_active = FALSE;
+
+ /**
+ * JQuery AJAX image
+ *
+ * @var string
+ */
public $jquery_ajax_img = '';
+ // --------------------------------------------------------------------
+
/**
* Constructor
*
@@ -383,8 +426,8 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery addClass event
*
- * @param string $element = 'this'
- * @param string $class = ''
+ * @param string $element
+ * @param string $class
* @return string
*/
protected function _addClass($element = 'this', $class = '')
@@ -400,10 +443,10 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery animate event
*
- * @param string $element = 'this'
- * @param array $params = array()
- * @param string $speed = '' 'slow', 'normal', 'fast', or time in milliseconds
- * @param string $extra = ''
+ * @param string $element
+ * @param array $params
+ * @param string $speed 'slow', 'normal', 'fast', or time in milliseconds
+ * @param string $extra
* @return string
*/
protected function _animate($element = 'this', $params = array(), $speed = '', $extra = '')
@@ -515,8 +558,8 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery remove class event
*
- * @param string $element = 'this'
- * @param string $class = ''
+ * @param string $element
+ * @param string $class
* @return string
*/
protected function _removeClass($element = 'this', $class = '')
@@ -623,8 +666,8 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs a jQuery toggle class event
*
- * @param string $element = 'this'
- * @param string $class = ''
+ * @param string $element
+ * @param string $class
* @return string
*/
protected function _toggleClass($element = 'this', $class = '')
@@ -708,9 +751,9 @@ class CI_Jquery extends CI_Javascript {
/**
* Zebra tables
*
- * @param string $class = ''
- * @param string $odd = 'odd'
- * @param string $hover = ''
+ * @param string $class
+ * @param string $odd
+ * @param string $hover
* @return string
*/
protected function _zebraTables($class = '', $odd = 'odd', $hover = '')
@@ -735,10 +778,9 @@ class CI_Jquery extends CI_Javascript {
/**
* Corner Plugin
*
- * http://www.malsup.com/jquery/corner/
- *
- * @param string $element = ''
- * @param string $corner_style = ''
+ * @link http://www.malsup.com/jquery/corner/
+ * @param string $element
+ * @param string $corner_style
* @return string
*/
public function corner($element = '', $corner_style = '')
@@ -762,7 +804,7 @@ class CI_Jquery extends CI_Javascript {
* Load a thickbox modal window
*
* @param string $src
- * @param bool $relative = FALSE
+ * @param bool $relative
* @return void
*/
public function modal($src, $relative = FALSE)
@@ -778,7 +820,7 @@ class CI_Jquery extends CI_Javascript {
* Load an Effect library
*
* @param string $src
- * @param bool $relative = FALSE
+ * @param bool $relative
* @return void
*/
public function effect($src, $relative = FALSE)
@@ -794,7 +836,7 @@ class CI_Jquery extends CI_Javascript {
* Load a plugin library
*
* @param string $src
- * @param bool $relative = FALSE
+ * @param bool $relative
* @return void
*/
public function plugin($src, $relative = FALSE)
@@ -810,7 +852,7 @@ class CI_Jquery extends CI_Javascript {
* Load a user interface library
*
* @param string $src
- * @param bool $relative = FALSE
+ * @param bool $relative
* @return void
*/
public function ui($src, $relative = FALSE)
@@ -826,7 +868,7 @@ class CI_Jquery extends CI_Javascript {
* Creates a jQuery sortable
*
* @param string $element
- * @param array $options = array()
+ * @param array $options
* @return string
*/
public function sortable($element, $options = array())
@@ -897,8 +939,8 @@ 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
*
- * @param string $view_var = 'script_foot'
- * @param bool $script_tags = TRUE
+ * @param string $view_var
+ * @param bool $script_tags
* @return void
*/
protected function _compile($view_var = 'script_foot', $script_tags = TRUE)
@@ -964,8 +1006,8 @@ class CI_Jquery extends CI_Javascript {
*
* Outputs the script tag that loads the jquery.js file into an HTML document
*
- * @param string $library_src = ''
- * @param bool $relative = FALSE
+ * @param string $library_src
+ * @param bool $relative
* @return string
*/
public function script($library_src = '', $relative = FALSE)