composer package updates
[openemr.git] / vendor / adldap2 / adldap2 / src / Configuration / Validators / Validator.php
bloba3236ce2ab6b3e86bfd44a538cbdcc54efa4fdc4
1 <?php
3 namespace Adldap\Configuration\Validators;
5 /**
6 * Class Validator
8 * Validates configuration values.
10 * @package Adldap\Configuration\Validators
12 abstract class Validator
14 /**
15 * The configuration key under validation.
17 * @var string
19 protected $key;
21 /**
22 * The configuration value under validation.
24 * @var mixed
26 protected $value;
28 /**
29 * Constructor.
31 * @param string $key
32 * @param mixed $value
34 public function __construct($key, $value)
36 $this->key = $key;
37 $this->value = $value;
40 /**
41 * Validates the configuration value.
43 * @return bool
45 * @throws \Adldap\Configuration\ConfigurationException When the value given fails validation.
47 abstract public function validate();