checkToken($token); if (!$ret) { throw new AppCommonException("トークン不正"); } $this->initialized = true; return $this; } public function initById(string $id) { $this->fetch($id); $this->initialized = true; return $this; } public function fill(array $attr) { $this->order->fill($attr); return $this; } protected function service() { $order = $this->order; // パラメータチェック $messages = $this->paramCheck(); if (count($messages) !== 0) { return $messages; } // モデル更新 $order->save(); return []; } private function paramCheck(): array { $ret = []; $order = $this->order; return $ret; } }