id = $id; } /** * Local product id that was looked up. */ public function id(): int { return $this->id; } /** * Convenience factory for the common "lookup by id failed" case. * * Produces the canonical message string the REST mapper relies * on when no caller-supplied summary is available. * * @param int $id Local product id that was looked up. */ public static function forId( int $id ): self { return new self( sprintf( 'Product with id %d was not found.', $id ), $id ); } }