PHP Class WC_Connect_Service_Schemas_Validator, woocommerce-connect-client

Show file Open project: Automattic/woocommerce-connect-client Class Usage Examples

Public Methods

Method Description
validate_service_schemas ( $service_schemas ) : WP_Error | true Validates the overall passed services object (all service types and all services therein)

Protected Methods

Method Description
validate_service_schema ( string $service_type, integer $service_counter, $service_schema ) : WP_Error | true Validates a particular service schema, especially the parts of the service that WC relies on like id, method_title, method_description, etc
validate_service_schema_settings ( string $service_id, object $service_settings ) : WP_Error | true Validates a particular service's service settings schema, especially the parts of the service settings that WC relies on like type, required and properties
validate_service_settings_required_properties ( string $service_id, object $service_settings_properties ) : WP_Error | true Validates a particular service's schema's required properties, especially the parts of the properties that WC relies on and title

Method Details

validate_service_schema() protected method

Validates a particular service schema, especially the parts of the service that WC relies on like id, method_title, method_description, etc
protected validate_service_schema ( string $service_type, integer $service_counter, $service_schema ) : WP_Error | true
$service_type string
$service_counter integer
return WP_Error | true

validate_service_schema_settings() protected method

Validates a particular service's service settings schema, especially the parts of the service settings that WC relies on like type, required and properties
protected validate_service_schema_settings ( string $service_id, object $service_settings ) : WP_Error | true
$service_id string
$service_settings object
return WP_Error | true

validate_service_schemas() public method

Validates the overall passed services object (all service types and all services therein)
public validate_service_schemas ( $service_schemas ) : WP_Error | true
return WP_Error | true

validate_service_settings_required_properties() protected method

Validates a particular service's schema's required properties, especially the parts of the properties that WC relies on and title
protected validate_service_settings_required_properties ( string $service_id, object $service_settings_properties ) : WP_Error | true
$service_id string
$service_settings_properties object
return WP_Error | true