* @param $str The string, what ever it is needs to be converted
* @return $className Generated class name
*/
- public function convertToClassName ($str) {
+ public static final function convertToClassName ($str) {
// Init class name
$className = '';
// Convert all dashes in underscores
- $str = $this->convertDashesToUnderscores($str);
+ $str = self::convertDashesToUnderscores($str);
// Now use that underscores to get classname parts for hungarian style
foreach (explode('_', $str) as $strPart) {
* @param $str The string with maybe dashes inside
* @return $str The converted string with no dashed, but underscores
*/
- public final function convertDashesToUnderscores ($str) {
+ public static final function convertDashesToUnderscores ($str) {
// Convert them all
$str = str_replace('-', '_', $str);
//* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, TRUE).'</pre>');
// Convert dashes to underscore
- $fieldName2 = $this->convertDashesToUnderscores($fieldName);
+ $fieldName2 = self::convertDashesToUnderscores($fieldName);
// Does the field exist?
if ($this->isFieldSet($fieldName)) {
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . $this->__toString() . ':' . __LINE__ . '] fieldName=' . $fieldName . ',fieldArray=<pre>'.print_r($fieldArray, TRUE).'</pre>');
// Convert dashes to underscore
- $fieldName = $this->convertDashesToUnderscores($fieldName);
+ $fieldName = self::convertDashesToUnderscores($fieldName);
// Determine it
$isSet = isset($fieldArray[$fieldName]);
$isReadable = FALSE;
// Is within parameters, so check if it is a file and readable
- $isReadable = ((self::isReachableFilePath($fileName)) && (is_file($fileName)) && (is_readable($fileName)));
+ $isReadable = ((self::isReachableFilePath($fileName)) && (file_exists($fileName)) && (is_file($fileName)) && (is_readable($fileName)));
// Return status
return $isReadable;