PHP 클래스 Wsdl2PhpGenerator\Validator

파일 보기 프로젝트 열기: wsdl2phpgenerator/wsdl2phpgenerator 1 사용 예제들

공개 메소드들

메소드 설명
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.