Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Validation

japatel edited this page Jan 10, 2015 · 4 revisions

We recently introduced a validation to determine if Model Object contains all the appropriate accessors (Getters and Setters) when converted from json response that we receive from Server. We use getter function's annotation to determine the type of the object it needs to be converted to. This allows us to map from JSON to PHP Objects with ease.

Configurations

  • validation.level
    • Options : log, strict, disable
    • log : logs the error message to logger only (default)
    • strict : throws a php notice message
    • disable : disable the validation

If set to log, the warning message would be logged into your log.logFileName, for e.g.:

PayPal\Validation\ModelAccessorValidator: WARNING: Missing Accessor: PayPal\Api\Payment:setFirstName . Please let us know by creating an issue at https://github.com/paypal/PayPal-PHP-SDK/issues