/** * Batch check trades. * * @param array $trades * @access public * @return void */ public function batchCheck($trades) { $this->app->loadClass('filter', true); $errors = array(); foreach ($trades as $key => $trade) { $item = $this->lang->trade->money; if (empty($trade->money) or !validater::checkFloat($trade->money)) { $errors["money" . $key] = sprintf($this->lang->error->notempty, $item) . sprintf($this->lang->error->float, $item); } $item = $this->lang->trade->handlers; if (empty($trade->handlers)) { $errors['handlers' . $key] = sprintf($this->lang->error->notempty, $item); } $item = $this->lang->trade->date; if (empty($trade->date) or !validater::checkDate($trade->date)) { $errors['date' . $key] = sprintf($this->lang->error->date, $item) . sprintf($this->lang->error->notempty, $item); } } return $errors; }