comparison vendor/symfony/validator/Constraints/Url.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
19 * 19 *
20 * @author Bernhard Schussek <bschussek@gmail.com> 20 * @author Bernhard Schussek <bschussek@gmail.com>
21 */ 21 */
22 class Url extends Constraint 22 class Url extends Constraint
23 { 23 {
24 const CHECK_DNS_TYPE_ANY = 'ANY';
25 const CHECK_DNS_TYPE_NONE = false;
26 const CHECK_DNS_TYPE_A = 'A';
27 const CHECK_DNS_TYPE_A6 = 'A6';
28 const CHECK_DNS_TYPE_AAAA = 'AAAA';
29 const CHECK_DNS_TYPE_CNAME = 'CNAME';
30 const CHECK_DNS_TYPE_MX = 'MX';
31 const CHECK_DNS_TYPE_NAPTR = 'NAPTR';
32 const CHECK_DNS_TYPE_NS = 'NS';
33 const CHECK_DNS_TYPE_PTR = 'PTR';
34 const CHECK_DNS_TYPE_SOA = 'SOA';
35 const CHECK_DNS_TYPE_SRV = 'SRV';
36 const CHECK_DNS_TYPE_TXT = 'TXT';
37
24 const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; 38 const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229';
25 39
26 protected static $errorNames = array( 40 protected static $errorNames = array(
27 self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', 41 self::INVALID_URL_ERROR => 'INVALID_URL_ERROR',
28 ); 42 );
29 43
30 public $message = 'This value is not a valid URL.'; 44 public $message = 'This value is not a valid URL.';
31 public $dnsMessage = 'The host could not be resolved.'; 45 public $dnsMessage = 'The host could not be resolved.';
32 public $protocols = array('http', 'https'); 46 public $protocols = array('http', 'https');
33 public $checkDNS = false; 47 public $checkDNS = self::CHECK_DNS_TYPE_NONE;
34 } 48 }