blitz-php /
framework
| 1 | <?php |
||||
| 2 | |||||
| 3 | /** |
||||
| 4 | * This file is part of Blitz PHP framework. |
||||
| 5 | * |
||||
| 6 | * (c) 2022 Dimitri Sitchet Tomkeu <[email protected]> |
||||
| 7 | * |
||||
| 8 | * For the full copyright and license information, please view |
||||
| 9 | * the LICENSE file that was distributed with this source code. |
||||
| 10 | */ |
||||
| 11 | |||||
| 12 | namespace BlitzPHP\Controllers; |
||||
| 13 | |||||
| 14 | use Psr\Http\Message\ResponseInterface; |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * Un contrôleur extensible pour aider à fournir une interface utilisateur pour une ressource. |
||||
| 18 | */ |
||||
| 19 | class ResourcePresenter extends ApplicationController |
||||
| 20 | { |
||||
| 21 | /** |
||||
| 22 | * Présenter une vue des objets de ressource |
||||
| 23 | * |
||||
| 24 | * @return ResponseInterface|string|void |
||||
| 25 | */ |
||||
| 26 | public function index() |
||||
| 27 | { |
||||
| 28 | return lang('Rest.notImplemented', ['index']); |
||||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * Présenter une vue pour présenter un objet de ressource spécifique |
||||
| 33 | * |
||||
| 34 | * @param int|string|null $id |
||||
| 35 | * |
||||
| 36 | * @return ResponseInterface|string|void |
||||
| 37 | */ |
||||
| 38 | public function show($id = null) |
||||
|
0 ignored issues
–
show
|
|||||
| 39 | { |
||||
| 40 | return lang('Rest.notImplemented', ['show']); |
||||
| 41 | } |
||||
| 42 | |||||
| 43 | /** |
||||
| 44 | * Présenter une vue pour présenter un nouvel objet de ressource unique |
||||
| 45 | * |
||||
| 46 | * @return ResponseInterface|string|void |
||||
| 47 | */ |
||||
| 48 | public function new() |
||||
| 49 | { |
||||
| 50 | return lang('Rest.notImplemented', ['new']); |
||||
| 51 | } |
||||
| 52 | |||||
| 53 | /** |
||||
| 54 | * Traiter la création/insertion d'un nouvel objet ressource. |
||||
| 55 | * Cela devrait être un POST. |
||||
| 56 | * |
||||
| 57 | * @return ResponseInterface|string|void |
||||
| 58 | */ |
||||
| 59 | public function create() |
||||
| 60 | { |
||||
| 61 | return lang('Rest.notImplemented', ['create']); |
||||
| 62 | } |
||||
| 63 | |||||
| 64 | /** |
||||
| 65 | * Présenter une vue pour modifier les propriétés d'un objet de ressource spécifique |
||||
| 66 | * |
||||
| 67 | * @param int|string|null $id |
||||
| 68 | * |
||||
| 69 | * @return ResponseInterface|string|void |
||||
| 70 | */ |
||||
| 71 | public function edit($id = null) |
||||
|
0 ignored issues
–
show
The parameter
$id is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 72 | { |
||||
| 73 | return lang('Rest.notImplemented', ['edit']); |
||||
| 74 | } |
||||
| 75 | |||||
| 76 | /** |
||||
| 77 | * Traiter la mise à jour, totale ou partielle, d'un objet ressource spécifique. |
||||
| 78 | * Cela devrait être un POST. |
||||
| 79 | * |
||||
| 80 | * @param int|string|null $id |
||||
| 81 | * |
||||
| 82 | * @return ResponseInterface|string|void |
||||
| 83 | */ |
||||
| 84 | public function update($id = null) |
||||
|
0 ignored issues
–
show
The parameter
$id is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 85 | { |
||||
| 86 | return lang('Rest.notImplemented', ['update']); |
||||
| 87 | } |
||||
| 88 | |||||
| 89 | /** |
||||
| 90 | * Présenter une vue pour confirmer la suppression d'un objet de ressource spécifique |
||||
| 91 | * |
||||
| 92 | * @param int|string|null $id |
||||
| 93 | * |
||||
| 94 | * @return ResponseInterface|string|void |
||||
| 95 | */ |
||||
| 96 | public function remove($id = null) |
||||
|
0 ignored issues
–
show
The parameter
$id is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 97 | { |
||||
| 98 | return lang('Rest.notImplemented', ['remove']); |
||||
| 99 | } |
||||
| 100 | |||||
| 101 | /** |
||||
| 102 | * Traiter la suppression d'un objet de ressource spécifique |
||||
| 103 | * |
||||
| 104 | * @param int|string|null $id |
||||
| 105 | * |
||||
| 106 | * @return ResponseInterface|string|void |
||||
| 107 | */ |
||||
| 108 | public function delete($id = null) |
||||
|
0 ignored issues
–
show
The parameter
$id is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 109 | { |
||||
| 110 | return lang('Rest.notImplemented', ['delete']); |
||||
| 111 | } |
||||
| 112 | } |
||||
| 113 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.