summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Inflector.php160
-rw-r--r--user_guide/scripts/nav.js1
2 files changed, 1 insertions, 160 deletions
diff --git a/system/libraries/Inflector.php b/system/libraries/Inflector.php
deleted file mode 100644
index b27228a54..000000000
--- a/system/libraries/Inflector.php
+++ /dev/null
@@ -1,160 +0,0 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
-
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package CodeIgniter
- * @author Rick Ellis
- * @copyright Copyright (c) 2006, pMachine, Inc.
- * @license http://www.codeignitor.com/user_guide/license.html
- * @link http://www.codeigniter.com
- * @since Version 1.0
- * @filesource
- */
-
-// ------------------------------------------------------------------------
-
-/**
- * Inflector Class
- *
- * @package CodeIgniter
- * @subpackage Libraries
- * @category Inflection
- * @author Rick Ellis
- * @link http://www.codeigniter.com/user_guide/general/errors.html
- */
-class CI_Inflector {
-
-
- /**
- * Constructor
- *
- * @access public
- */
- function CI_Inflector()
- {
- log_message('debug', "Inflector Class Initialized");
- }
- // END CI_Inflector()
-
- // --------------------------------------------------------------------
-
- /**
- * Singular
- *
- * Takes a plural word and makes it singular
- *
- * @access public
- * @param string
- * @return str
- */
- function singular($str)
- {
- $str = strtolower(trim($str));
- $end = substr($str, -3);
-
- if ($end == 'ies')
- {
- $str = substr($str, 0, strlen($str)-3).'y';
- }
- else
- {
- $end = substr($str, -1);
-
- if ($end == 's')
- {
- $str = substr($str, 0, strlen($str)-1);
- }
- }
-
- return $str;
- }
- // END singular()
-
- // --------------------------------------------------------------------
-
- /**
- * Plural
- *
- * Takes a singular word and makes it plural
- *
- * @access public
- * @param string
- * @return str
- */
- function plural($str)
- {
- $str = strtolower(trim($str));
- $end = substr($str, -1);
-
- if ($end == 'y')
- {
- $str = substr($str, 0, strlen($str)-1).'ies';
- }
- elseif ($end != 's')
- {
- $str .= 's';
- }
-
- return $str;
- }
- // END plural()
-
- // --------------------------------------------------------------------
-
- /**
- * Camelize
- *
- * Takes multiple words separated by spaces or underscores and camelizes them
- *
- * @access public
- * @param string
- * @return str
- */
- function camelize($str)
- {
- $str = 'x'.strtolower(trim($str));
- $str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
- return substr(str_replace(' ', '', $str), 1);
- }
- // END camelize()
-
- // --------------------------------------------------------------------
-
- /**
- * Underscore
- *
- * Takes multiple words separated by spaces and underscores them
- *
- * @access public
- * @param string
- * @return str
- */
- function underscore($str)
- {
- return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
- }
- // END underscore()
-
- // --------------------------------------------------------------------
-
- /**
- * Humanize
- *
- * Takes multiple words separated by underscores and changes them to spaces
- *
- * @access public
- * @param string
- * @return str
- */
- function humanize($str)
- {
- return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
- }
- // END humanize()
-
-}
-// END CI_Inflector
-?> \ No newline at end of file
diff --git a/user_guide/scripts/nav.js b/user_guide/scripts/nav.js
index 27e65530c..de5a35fa8 100644
--- a/user_guide/scripts/nav.js
+++ b/user_guide/scripts/nav.js
@@ -96,6 +96,7 @@ function create_menu(basepath)
'<li><a href="'+base+'helpers/file_helper.html">File Helper</a></li>' +
'<li><a href="'+base+'helpers/form_helper.html">Form Helper</a></li>' +
'<li><a href="'+base+'helpers/html_helper.html">HTML Helper</a></li>' +
+ '<li><a href="'+base+'helpers/inflector_helper.html">Inflector Helper</a></li>' +
'<li><a href="'+base+'helpers/security_helper.html">Security Helper</a></li>' +
'<li><a href="'+base+'helpers/string_helper.html">String Helper</a></li>' +
'<li><a href="'+base+'helpers/text_helper.html">Text Helper</a></li>' +