| @@ 30-36 (lines=7) @@ | ||
| 27 | } |
|
| 28 | } |
|
| 29 | ||
| 30 | public function insert(AssetPackage $package) { |
|
| 31 | $this->db->createCommand()->insert('package', [ |
|
| 32 | 'type' => $package->getType(), |
|
| 33 | 'name' => $package->getName(), |
|
| 34 | 'last_update' => $package->getUpdateTime(), |
|
| 35 | ])->execute(); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function update(AssetPackage $package) |
|
| 39 | { |
|
| @@ 38-46 (lines=9) @@ | ||
| 35 | ])->execute(); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function update(AssetPackage $package) |
|
| 39 | { |
|
| 40 | $this->db->createCommand()->update('package', [ |
|
| 41 | 'last_update' => $package->getUpdateTime() |
|
| 42 | ], [ |
|
| 43 | 'type' => $package->getType(), |
|
| 44 | 'name' => $package->getName(), |
|
| 45 | ])->execute(); |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @param AssetPackage $package |
|