PHP Класс Wsdl2PhpGenerator\Validator

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
validateAttribute ( string $name ) : string Validates an attribute name against PHP naming conventions.
validateClass ( string $name, string $namespace = null ) : string Validates a class name against PHP naming conventions and already defined classes.
validateConstant ( string $name ) : string Validates a constant name against PHP naming conventions.
validateOperation ( string $name ) : string Validates an operation name against PHP naming conventions.
validateType ( string $typeName ) : string Validates a wsdl type against known PHP primitive types, or otherwise validates the namespace of the type to PHP naming conventions
validateTypeHint ( string $typeName ) : null | string Validates a type to be used as a method parameter type hint.
validateUnique ( $name, callable $function, string $suffix = null ) : string Validate that a name is unique.

Приватные методы

Метод Описание
isKeyword ( string $string ) : boolean Checks if a string is a restricted keyword.
validateNamingConvention ( string $name ) : string Validates a name against standard PHP naming conventions

Описание методов

validateAttribute() публичный статический Метод

Validates an attribute name against PHP naming conventions.
public static validateAttribute ( string $name ) : string
$name string the name of the attribute to test
Результат string The validated version of the submitted attribute name

validateClass() публичный статический Метод

Validates a class name against PHP naming conventions and already defined classes.
public static validateClass ( string $name, string $namespace = null ) : string
$name string the name of the class to test
$namespace string the name of the namespace
Результат string The validated version of the submitted class name

validateConstant() публичный статический Метод

Validates a constant name against PHP naming conventions.
public static validateConstant ( string $name ) : string
$name string the name of the constant to test
Результат string The validated version of the submitted constant name

validateOperation() публичный статический Метод

Validates an operation name against PHP naming conventions.
public static validateOperation ( string $name ) : string
$name string the name of the operation to test
Результат string The validated version of the submitted operation name

validateType() публичный статический Метод

Validates a wsdl type against known PHP primitive types, or otherwise validates the namespace of the type to PHP naming conventions
public static validateType ( string $typeName ) : string
$typeName string the type to test
Результат string the validated version of the submitted type

validateTypeHint() публичный статический Метод

Validates a type to be used as a method parameter type hint.
public static validateTypeHint ( string $typeName ) : null | string
$typeName string The name of the type to test.
Результат null | string Returns a valid type hint for the type or null if there is no valid type hint.

validateUnique() публичный статический Метод

If a name is not unique then append a suffix and numbering.
public static validateUnique ( $name, callable $function, string $suffix = null ) : string
$name The name to test.
$function callable A callback which should return true if the element is unique. Otherwise false.
$suffix string A suffix to append between the name and numbering.
Результат string A unique name.