| @@ 322-327 (lines=6) @@ | ||
| 319 | */ |
|
| 320 | public function loadItemFromKey($key, $ident, StorableInterface $item = null) |
|
| 321 | { |
|
| 322 | if ($item !== null) { |
|
| 323 | $this->setModel($item); |
|
| 324 | } else { |
|
| 325 | $class = get_class($this->model()); |
|
| 326 | $item = new $class; |
|
| 327 | } |
|
| 328 | ||
| 329 | // Missing parameters |
|
| 330 | if (!$key || !$ident) { |
|
| @@ 360-365 (lines=6) @@ | ||
| 357 | */ |
|
| 358 | public function loadItemFromQuery($query, array $binds = [], StorableInterface $item = null) |
|
| 359 | { |
|
| 360 | if ($item !== null) { |
|
| 361 | $this->setModel($item); |
|
| 362 | } else { |
|
| 363 | $class = get_class($this->model()); |
|
| 364 | $item = new $class; |
|
| 365 | } |
|
| 366 | ||
| 367 | // Missing parameters |
|
| 368 | if (!$query) { |
|