PayPalValidationUrlValidator

Class UrlValidator.

Defined (1)

The class is defined in the following location(s).

/classes/lib/PayPal/Validation/UrlValidator.php  
  1. class UrlValidator 
  2.  
  3. /** 
  4. * Helper method for validating URLs that will be used by this API in any requests. 
  5. * @param $url 
  6. * @param string|null $urlName 
  7. * @throws \InvalidArgumentException 
  8. */ 
  9. public static function validate($url, $urlName = null) 
  10. if (filter_var($url, FILTER_VALIDATE_URL) === false) { 
  11. throw new \InvalidArgumentException("$urlName is not a fully qualified URL");