| @@ 370-375 (lines=6) @@ | ||
| 367 | */ |
|
| 368 | public function loadItemFromKey($key, $ident, StorableInterface $item = null) |
|
| 369 | { |
|
| 370 | if ($item !== null) { |
|
| 371 | $this->setModel($item); |
|
| 372 | } else { |
|
| 373 | $class = get_class($this->model()); |
|
| 374 | $item = new $class; |
|
| 375 | } |
|
| 376 | ||
| 377 | // Missing parameters |
|
| 378 | if (!$key || !$ident) { |
|
| @@ 411-416 (lines=6) @@ | ||
| 408 | */ |
|
| 409 | public function loadItemFromQuery($query, array $binds = [], StorableInterface $item = null) |
|
| 410 | { |
|
| 411 | if ($item !== null) { |
|
| 412 | $this->setModel($item); |
|
| 413 | } else { |
|
| 414 | $class = get_class($this->model()); |
|
| 415 | $item = new $class; |
|
| 416 | } |
|
| 417 | ||
| 418 | // Missing parameters |
|
| 419 | if (!$query) { |
|