Ejemplo n.º 1
0
 /**
  * Validates value of offset.
  *
  * @param string $offset
  *
  * @return void
  *
  * @throws Exception\InvalidArgumentException
  */
 private function validate($offset)
 {
     if ($this->validator) {
         $error = $this->validator->validate($offset, $this->values[$offset]);
         if ($error) {
             throw new Exception\InvalidArgumentException($error);
         }
     }
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct(['offset1' => 'int', 'offset2' => 'int', 'offset3' => 'array', 'path2' => 'string']);
 }