FuelPHP
にてRest
コントローラーを利用してAPI
を作成しています。
コントローラーの名前付けに関して皆様がどのようにされている
のか気になりまして質問させてください。
/controller/api/
配下に様々なAPI
用のコントローラーを作成しております。
この場合において、
product
とblog
のコメントを追加・修正・削除などを行う
API
を作成する場合コントローラーのクラス名として
どのような名前付けが妥当でしょうか?
パターン①から④を考えたのですが、どのような名前付けがよいか
ご意見頂ければ幸いです。
よろしくお願い致します。
パターン① /controller/api/productcomments.php class Controller_Api_Productcomments extends Controller_Rest {} /controller/api/blogcomments.php class Controller_Api_Blogcomments extends Controller_Rest {}
パターン② /controller/api/productcomments.php class Controller_Api_ProductComments extends Controller_Rest {} /controller/api/blogcomments.php class Controller_Api_BlogComments extends Controller_Rest {}
パターン③ /controller/api/product/comments.php class Controller_Api_Product_Comments extends Controller_Rest {} /controller/api/blog/comments.php class Controller_Api_Blog_Comments extends Controller_Rest {}
パターン④ /controller/api/comments/product.php class Controller_Api_Comments_Product extends Controller_Rest {} /controller/api/comments/blog.php class Controller_Api_Comments_Blog extends Controller_Rest {}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/09/16 05:13
2017/09/16 05:19 編集
2017/09/19 13:49
2017/09/19 14:08 編集
2017/09/30 06:29
2017/09/30 06:47 編集
2017/09/30 08:43