public static function create($data, $repo, $msgs = []) { $user = new User($data, $msgs); $user->setRepository($repo); return $user; }
protected function getInput($vals, $msgs = []) { $inputData = $this->getObjectValue($this->input, 'data'); $data = array_merge($inputData, $vals); $input = new User($data, $msgs); return $input->setRepository($this->repo); }