{"id":1171,"date":"2014-01-08T21:34:48","date_gmt":"2014-01-08T12:34:48","guid":{"rendered":"http:\/\/blog.kcmservice.biz\/?p=1171"},"modified":"2014-01-27T12:23:48","modified_gmt":"2014-01-27T03:23:48","slug":"1171","status":"publish","type":"post","link":"https:\/\/blog.kcmservice.biz\/?p=1171","title":{"rendered":"\uff15\u65e5\u76ee\u3000Model\u3068Service"},"content":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u304b\u3089\u304b\u306a\u308a\u65e5\u304c\u958b\u3044\u305f\u3051\u3069\u3001\u305d\u306e\u7d9a\u304d\u3002<br \/>\n\u524d\u56de\u306e\u8a18\u4e8b\u306f<a href=\"http:\/\/blog.kcmservice.biz\/?p=1105\">\u30b3\u30c1\u30e9<\/a>\u304b\u3089\u3002<br \/>\n\u4eca\u56de\u306f\u3001MVC\u30e2\u30c7\u30eb\u306e\u6b8b\u308a\u3067\u3042\u308b\u300cModel\uff08\u30e2\u30c7\u30eb\uff09\u300d\u3068\u3001Curry\u72ec\u7279\u306e\u30e2\u30c7\u30eb\u300cService\uff08\u30b5\u30fc\u30d3\u30b9\uff09\u300d\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3002<\/p>\n<blockquote><p>\u53c2\u8003\uff1a<\/p>\n<p>\u672c\u5bb6\u69d8\u30b5\u30a4\u30c8 &#8212; \u30de\u30cb\u30e5\u30a2\u30eb\uff1a<a href=\" http:\/\/www.curryfw.net\/manual\/model\" target=\"_blank\">Model\u306b\u3064\u3044\u3066<\/a><br \/>\n\u672c\u5bb6\u69d8\u30b5\u30a4\u30c8 &#8212; \u30de\u30cb\u30e5\u30a2\u30eb\uff1a<a href=\" http:\/\/www.curryfw.net\/manual\/service\" target=\"_blank\">Service\u306b\u3064\u3044\u3066<\/a><\/p><\/blockquote>\n<p><!--more--><\/p>\n<h3>Model\u306b\u3064\u3044\u3066<\/h3>\n<p>\u901a\u5e38\u3001MVC\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308bModel\u306f\u30e1\u30a4\u30f3\u30ed\u30b8\u30c3\u30af\u3092\u8a18\u8f09\u3059\u308b\u3082\u306e\u3060\u304c\u3001curry\u306b\u304a\u3044\u3066\u306f\u30c6\u30fc\u30d6\u30eb\u3068\uff11\uff1a\uff11\u3067\u7d50\u3073\u3064\u3044\u305f\u3082\u306e\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\n\u3053\u3053\u3089\u3078\u3093\u306f\u672c\u5bb6\u30b5\u30a4\u30c8\u306e\u300cModel\u306b\u3064\u3044\u3066\u300d\u306b\u3082\u8a73\u3057\u304f\u66f8\u3044\u3066\u3042\u308b\u3002<br \/>\nModel\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u306e\u30a2\u30af\u30bb\u30b9\u3084\u57fa\u672c\u7684\u306a\u51e6\u7406\uff08\u521d\u671f\u5316\u306a\u3069\uff09\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u5bf8\u6cd5\u3067\u3042\u308b\u3002<\/p>\n<h3>Service\u306b\u3064\u3044\u3066<\/h3>\n<p>Model\u304c\u30c6\u30fc\u30d6\u30eb\u3068\u7d50\u3073\u3064\u3044\u3066\u3044\u308b\u3082\u306e\u3001\u3068\u306a\u308b\u3068\u3001\u672c\u6765\u306eMVC\u30e2\u30c7\u30eb\u306eM\u306e\u30ed\u30b8\u30c3\u30af\u8a18\u8ff0\u3068\u3044\u3046\u306e\u304c\u3069\u3053\u306b\u3044\u304f\u306e\uff1f\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001curr\u3067\u306f\u30ed\u30b8\u30c3\u30af\u306e\u8a18\u8ff0\u306fService\u306b\u884c\u3046\u3088\u3046\u63a8\u5968\u3057\u3066\u3044\u308b\u3002<br \/>\n\u30ed\u30b0\u30a4\u30f3\u51e6\u7406\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u306a\u3069\u306e\u30e1\u30a4\u30f3\u30ed\u30b8\u30c3\u30af\u306f\u3001Service\u306b\u66f8\u304f\u3068\u3044\u3044\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066<\/h3>\n<p>Model\u3092\u5229\u7528\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<br \/>\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306f\u3001\u4e0b\u8a18\uff12\u30d5\u30a1\u30a4\u30eb\u3067\u305d\u308c\u305e\u308c\u8a2d\u5b9a\u306e\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\uff11\uff09configs\/database.ini<br \/>\n\u30db\u30b9\u30c8\u540d\u3084\u30e6\u30fc\u30b6\u540d\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u5b58\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3002\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<blockquote><p>[product]<br \/>\n;mysql or pgsql or sqlite<br \/>\ntype = mysql<\/p>\n<p>;database server ip address<br \/>\nhost = localhost<\/p>\n<p>;database name<br \/>\ndbname =<\/p>\n<p>;database user<br \/>\nuser =<\/p>\n<p>;database password<br \/>\npassword =<\/p>\n<p>;port = 3306<br \/>\n;charset = utf8<br \/>\n\u30fb<br \/>\n\u30fb<\/p><\/blockquote>\n<p>\u4e0a\u306ehost \/ dbname \/ user \/ password\u3000\u306b\u305d\u308c\u305e\u308c\u30db\u30b9\u30c8\u540d\u3084DB\u30b9\u30ad\u30fc\u30de\u540d\u306a\u3069\u3092\u8a2d\u5b9a\u3059\u308b\u3060\u3051\u3067OK\u3002<br \/>\n\u307e\u305f\u3001database.ini\u306f\u305d\u308c\u305e\u308c\u306e\u74b0\u5883\u3054\u3068\u306b\u7570\u306a\u308b\u5185\u5bb9\u3092\uff11\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u7ba1\u7406\u3067\u304d\u308b\u3002<br \/>\n\u4e0a\u8a18\u4f8b\u3060\u3068[product]\u306e\u90e8\u5206\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u5024\u3092\u4fdd\u5b58\u3057\u308f\u3051\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\uff12\uff09.htaccess<br \/>\n\u5f53\u8a72\u30b5\u30fc\u30d0\u30fc\u304c\u3069\u306e\u74b0\u5883\u3067\u3042\u308b\u304b\u3092\u9078\u629e\u3067\u304d\u308b\u3002<br \/>\n\u5f53\u8a72\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u884c\u306b\u4e0b\u8a18\u306e\u8a18\u8ff0\u304c\u3042\u308b\u3002<\/p>\n<blockquote><p>SetEnv APP_ENV product<\/p><\/blockquote>\n<p>\u3053\u3061\u3089\u306eproduct\u3092\u305d\u308c\u305e\u308c\u306e\u30b5\u30fc\u30d0\u30fc\u3054\u3068\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u74b0\u5883\u306e\u5207\u308a\u66ff\u3048\u304c\u53ef\u80fd\u3068\u3044\u3046\u5bf8\u6cd5\u3067\u3042\u308b\u3002<br \/>\n\u4eca\u56de\u306fproduct\u3068\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u308c\u3092develop\u3068\u3059\u308b\u3053\u3068\u3067\u3001develop\u306e\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3002<br \/>\n\u3053\u306e\u5207\u308a\u66ff\u3048\u306f\u4ed6\u306e\u90e8\u5206\u3067\u3082\u5229\u7528\u3067\u304d\u308b\u306e\u3067\u3001\u7a4d\u6975\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u3053\u308d\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u4eca\u56de\u306f\u3053\u3053\u307e\u3067\u3002<br \/>\n\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3059\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u304b\u3089\u304b\u306a\u308a\u65e5\u304c\u958b\u3044\u305f\u3051\u3069\u3001\u305d\u306e\u7d9a\u304d\u3002 \u524d\u56de\u306e\u8a18\u4e8b\u306f\u30b3\u30c1\u30e9\u304b\u3089\u3002 \u4eca\u56de\u306f\u3001MVC\u30e2\u30c7\u30eb\u306e\u6b8b\u308a\u3067\u3042\u308b\u300cModel\uff08\u30e2\u30c7\u30eb\uff09\u300d\u3068\u3001Curry\u72ec\u7279\u306e\u30e2\u30c7\u30eb\u300cService\uff08\u30b5\u30fc\u30d3\u30b9\uff09\u300d\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3002 \u53c2\u8003\uff1a \u672c\u5bb6\u69d8\u30b5\u30a4&nbsp;&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[31,30],"class_list":["post-1171","post","type-post","status-publish","format-standard","hentry","category-php-framework","tag-curry","tag-php"],"_links":{"self":[{"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/posts\/1171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1171"}],"version-history":[{"count":2,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/posts\/1171\/revisions"}],"predecessor-version":[{"id":1173,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=\/wp\/v2\/posts\/1171\/revisions\/1173"}],"wp:attachment":[{"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kcmservice.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}