private static function validateNamingConvention($name)
    {
        $name = iconv("UTF-8", "ASCII//TRANSLIT", $name);

        // Prepend the string a to names that begin with anything but a-z This is to make a valid name
        if (preg_match('/^[A-Za-z_]/', $name) == false) {
            $name = self::NAME_PREFIX . ucfirst($name);
        }

        return preg_replace('/[^a-zA-Z0-9_x7f-xff]*/', '', preg_replace('/^[^a-zA-Z_x7f-xff]*/', '', $name));
    }
private static function validateNamingConvention($name)
    {
        $name = iconv("UTF-8", "ASCII//TRANSLIT", $name);

        // Prepend the string a to names that begin with anything but a-z This is to make a valid name
        if (preg_match('/^[A-Za-z_]/', $name) == false) {
            $name = self::NAME_PREFIX . ucfirst($name);
        }

        return preg_replace('/[^a-zA-Z0-9_x7f-xff]*/', '', preg_replace('/^[^a-zA-Z_x7f-xff]*/', '', $name));
    }
private static function validateNamingConvention ( $ name ) { $ name = iconv ( "UTF-8" , "ASCII//TRANSLIT" , $ name ) ; // Prepend the string a to names that begin with anything but a-z This is to make a valid name if ( preg_match ( '/^[A-Za-z_]/' , $ name ) == false ) { $ name = self :: NAME_PREFIX . ucfirst ( $ name ) ; } return preg_replace ( '/[^a-zA-Z0-9_x7f-xff]*/' , '' , preg_replace ( '/^[^a-zA-Z_x7f-xff]*/' , '' , $ name ) ) ; }
Validates a name against standard PHP naming conventions

@param string $name the name to validate
@return string the validated version of the submitted name
Validates a name against standard PHP naming conventions