Respect\Validation\Rules\KeySet::check PHP 메소드

check() 공개 메소드

public check ( $input )
    public function check($input)
    {
        $this->checkKeys($input);
        return parent::check($input);
    }

Usage Example

예제 #1
0
 /**
  * @expectedException Respect\Validation\Exceptions\KeySetException
  * @expectedExceptionMessage Must have keys { "foo", "bar" }
  */
 public function testShouldCheckKeys()
 {
     $input = [];
     $key1 = new Key('foo', new AlwaysValid(), true);
     $key2 = new Key('bar', new AlwaysValid(), true);
     $keySet = new KeySet($key1, $key2);
     $keySet->check($input);
 }