Wsdl2PhpGenerator\Validator::validateNamingConvention PHP Method

validateNamingConvention() private static method

Validates a name against standard PHP naming conventions
private static validateNamingConvention ( string $name ) : string
$name string the name to validate
return string the validated version of the submitted 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));
    }