protected function remainder(Validate $validate, $input) { $input = ArrayHelper::diffByKeys($input, array_keys($this->attributes)); $config = ['remainder' => $this->remainder, 'attributes' => $validate]; Instance::configure($this, $config); $this->validate($input); }
protected function remainder(Sanitize $sanitize, array $attributes, $input) { $input = ArrayHelper::diffByKeys($input, array_keys($attributes)); $this->attributes = $sanitize; return $this->sanitize($input); }
/** * Adding pagination. * * @return void */ protected function calculatePagination() { if (empty($this->pagination['array']) && empty($this->pagination['call'])) { return; } if (isset($this->pagination['call'])) { $this->pagination['array'] = $this->callFunction($this->pagination['call']); } $keys = ['toPlaceholder']; $pagination = $this->template->getSnippet('pagination', ArrayHelper::diffByKeys($this->pagination, $keys)); if (!empty($this->pagination['toPlaceholder'])) { $this->template->addPlaceholder($this->pagination['toPlaceholder'], $pagination); $this->template->cachePlaceholders[$this->pagination['toPlaceholder']] = $pagination; return; } $this->template->addPlaceholder('pagination', $pagination); }