scripts/postfixadmin-cli.php
- replace usage of Inflector::camelize() with ucfirst() - for our usage, it gives the same result with easier understandable code - remove unused PHP5 define shells/shell.php: - remove definition of unused variable $shellKey, which also removes the last usage of Inflector::underscore - remove code that was commented out since a while scripts/inflector.php: - delete file, no longer needed git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1577 a1433add-5e2c-0410-b055-b7f2511e0802pull/2/head
parent
84b160bd8e
commit
72f0818391
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* -.
|
||||
*
|
||||
* Used by Cake's naming conventions throughout the framework.
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
|
||||
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* 1785 E. Sahara Avenue, Suite 490-204
|
||||
* Las Vegas, Nevada 89104
|
||||
* Modified for Postfixadmin by Valkum
|
||||
*
|
||||
* Copyright 2010
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||
* @link http://postfixadmin.sourceforge.net/ Postfixadmin on Sourceforge
|
||||
* @package postfixadmin
|
||||
* @subpackage -
|
||||
* @since -
|
||||
* @version $Revision$
|
||||
* @modifiedby $LastChangedBy$
|
||||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
class Inflector {
|
||||
/**
|
||||
* Returns given $lower_case_and_underscored_word as a CamelCased word.
|
||||
*
|
||||
* @param string $lower_case_and_underscored_word Word to camelize
|
||||
* @return string Camelized word. LikeThis.
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
public static function camelize($lowerCaseAndUnderscoredWord) {
|
||||
$replace = str_replace(" ", "", ucwords(str_replace("_", " ", $lowerCaseAndUnderscoredWord)));
|
||||
return $replace;
|
||||
}
|
||||
/**
|
||||
* Returns an underscore-syntaxed ($like_this_dear_reader) version of the $camel_cased_word.
|
||||
*
|
||||
* @param string $camel_cased_word Camel-cased word to be "underscorized"
|
||||
* @return string Underscore-syntaxed version of the $camel_cased_word
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
public static function underscore($camelCasedWord) {
|
||||
$replace = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $camelCasedWord));
|
||||
return $replace;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue