__construct() 공개 메소드

public __construct ( $reference, Respect\Validation\Validatable $validator = null, $mandatory = true )
$validator Respect\Validation\Validatable
예제 #1
0
 public function __construct($reference, Validatable $validator = null, $mandatory = true)
 {
     if (!is_string($reference) || empty($reference)) {
         throw new ComponentException('Invalid attribute/property name');
     }
     parent::__construct($reference, $validator, $mandatory);
 }
예제 #2
0
파일: Key.php 프로젝트: dez-php/Validation
 public function __construct($reference, Validatable $referenceValidator = null, $mandatory = true)
 {
     if (!is_scalar($reference) || '' === $reference) {
         throw new ComponentException('Invalid array key name');
     }
     parent::__construct($reference, $referenceValidator, $mandatory);
 }