/** * 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); } } }
public function __construct() { parent::__construct(['offset1' => 'int', 'offset2' => 'int', 'offset3' => 'array', 'path2' => 'string']); }