{"id":85,"date":"2012-04-17T16:44:55","date_gmt":"2012-04-17T07:44:55","guid":{"rendered":"http:\/\/tech.eshima.info\/?p=85"},"modified":"2012-04-17T17:09:43","modified_gmt":"2012-04-17T08:09:43","slug":"cakephp%e3%81%aeafterfind","status":"publish","type":"post","link":"https:\/\/tech.eshima.info\/?p=85","title":{"rendered":"cakePHP\u306eafterFind"},"content":{"rendered":"<p>find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002<\/p>\n<pre lang=\"php\">\r\n\tpublic $options = array(\r\n\t\t'flag' => array(\r\n\t\t\t1 => '\u30ab\u30c6\u30b4\u30eaA',\r\n\t\t\t2 => '\u30ab\u30c6\u30b4\u30eaB',\r\n\t\t),\r\n\t);\r\n\tpublic function afterFind($results) {\r\n\t\tforeach ($results as $key => $val) {\r\n\t\t\tif (isset($results[$key]['User']) && is_array($results[$key]['User'])) {\r\n\t\t\t\t$val = $results[$key]['User']['flag'];\r\n\t\t\t\t$results[$key]['User']['flag'] = array();\r\n\t\t\t\t$results[$key]['User']['flag']['val'] = $val;\r\n\t\t\t\t$results[$key]['User']['flag']['str'] = $this->options['flag'][$val];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-cakephp"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"eshimatech\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tech.eshima.info\/?p=85\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a | \u4e3b\u306b\u30a6\u30a7\u30d6\u95a2\u4fc2\u306e\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u30e1\u30e2\u3057\u307e\u3059\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a\" \/>\n\t\t<meta property=\"og:description\" content=\"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tech.eshima.info\/?p=85\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-04-17T07:44:55+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2012-04-17T08:09:43+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a\" \/>\n\t\t<meta name=\"twitter:description\" content=\"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#article\",\"name\":\"cakePHP\\u306eafterFind | \\u6c5f\\u5cf6\\uff20\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\",\"headline\":\"cakePHP\\u306eafterFind\",\"author\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/#organization\"},\"datePublished\":\"2012-04-17T16:44:55+09:00\",\"dateModified\":\"2012-04-17T17:09:43+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#webpage\"},\"articleSection\":\"CakePHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/tech.eshima.info\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?cat=10#listItem\",\"name\":\"CakePHP\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?cat=10#listItem\",\"position\":2,\"name\":\"CakePHP\",\"item\":\"https:\\\/\\\/tech.eshima.info\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#listItem\",\"name\":\"cakePHP\\u306eafterFind\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#listItem\",\"position\":3,\"name\":\"cakePHP\\u306eafterFind\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?cat=10#listItem\",\"name\":\"CakePHP\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/#organization\",\"name\":\"\\u6c5f\\u5cf6\\uff20\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\",\"description\":\"\\u4e3b\\u306b\\u30a6\\u30a7\\u30d6\\u95a2\\u4fc2\\u306e\\u6280\\u8853\\u7684\\u306a\\u3053\\u3068\\u3092\\u30e1\\u30e2\\u3057\\u307e\\u3059\",\"url\":\"https:\\\/\\\/tech.eshima.info\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?author=2#author\",\"url\":\"https:\\\/\\\/tech.eshima.info\\\/?author=2\",\"name\":\"eshimatech\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c4bfd517fbe2f3f44baf3808cbdf41276452eade0b100b1c2b5c1128c4d65324?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"eshimatech\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#webpage\",\"url\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85\",\"name\":\"cakePHP\\u306eafterFind | \\u6c5f\\u5cf6\\uff20\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\",\"description\":\"find\\u3067\\u53d6\\u5f97\\u3059\\u308b\\u30c7\\u30fc\\u30bf\\u306b\\u8868\\u793a\\u7528\\u306e\\u30c6\\u30ad\\u30b9\\u30c8\\u306a\\u3069\\u4ed8\\u3051\\u305f\\u3044\\u5834\\u5408\\u306fModel\\u3067afterFind\\u3002 public $\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?p=85#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/?author=2#author\"},\"datePublished\":\"2012-04-17T16:44:55+09:00\",\"dateModified\":\"2012-04-17T17:09:43+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/#website\",\"url\":\"https:\\\/\\\/tech.eshima.info\\\/\",\"name\":\"\\u6c5f\\u5cf6\\uff20\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\",\"description\":\"\\u4e3b\\u306b\\u30a6\\u30a7\\u30d6\\u95a2\\u4fc2\\u306e\\u6280\\u8853\\u7684\\u306a\\u3053\\u3068\\u3092\\u30e1\\u30e2\\u3057\\u307e\\u3059\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/tech.eshima.info\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","description":"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $","canonical_url":"https:\/\/tech.eshima.info\/?p=85","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tech.eshima.info\/?p=85#article","name":"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","headline":"cakePHP\u306eafterFind","author":{"@id":"https:\/\/tech.eshima.info\/?author=2#author"},"publisher":{"@id":"https:\/\/tech.eshima.info\/#organization"},"datePublished":"2012-04-17T16:44:55+09:00","dateModified":"2012-04-17T17:09:43+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/tech.eshima.info\/?p=85#webpage"},"isPartOf":{"@id":"https:\/\/tech.eshima.info\/?p=85#webpage"},"articleSection":"CakePHP"},{"@type":"BreadcrumbList","@id":"https:\/\/tech.eshima.info\/?p=85#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tech.eshima.info#listItem","position":1,"name":"Home","item":"https:\/\/tech.eshima.info","nextItem":{"@type":"ListItem","@id":"https:\/\/tech.eshima.info\/?cat=10#listItem","name":"CakePHP"}},{"@type":"ListItem","@id":"https:\/\/tech.eshima.info\/?cat=10#listItem","position":2,"name":"CakePHP","item":"https:\/\/tech.eshima.info\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/tech.eshima.info\/?p=85#listItem","name":"cakePHP\u306eafterFind"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tech.eshima.info#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tech.eshima.info\/?p=85#listItem","position":3,"name":"cakePHP\u306eafterFind","previousItem":{"@type":"ListItem","@id":"https:\/\/tech.eshima.info\/?cat=10#listItem","name":"CakePHP"}}]},{"@type":"Organization","@id":"https:\/\/tech.eshima.info\/#organization","name":"\u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","description":"\u4e3b\u306b\u30a6\u30a7\u30d6\u95a2\u4fc2\u306e\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u30e1\u30e2\u3057\u307e\u3059","url":"https:\/\/tech.eshima.info\/"},{"@type":"Person","@id":"https:\/\/tech.eshima.info\/?author=2#author","url":"https:\/\/tech.eshima.info\/?author=2","name":"eshimatech","image":{"@type":"ImageObject","@id":"https:\/\/tech.eshima.info\/?p=85#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/c4bfd517fbe2f3f44baf3808cbdf41276452eade0b100b1c2b5c1128c4d65324?s=96&d=mm&r=g","width":96,"height":96,"caption":"eshimatech"}},{"@type":"WebPage","@id":"https:\/\/tech.eshima.info\/?p=85#webpage","url":"https:\/\/tech.eshima.info\/?p=85","name":"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","description":"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $","inLanguage":"ja","isPartOf":{"@id":"https:\/\/tech.eshima.info\/#website"},"breadcrumb":{"@id":"https:\/\/tech.eshima.info\/?p=85#breadcrumblist"},"author":{"@id":"https:\/\/tech.eshima.info\/?author=2#author"},"creator":{"@id":"https:\/\/tech.eshima.info\/?author=2#author"},"datePublished":"2012-04-17T16:44:55+09:00","dateModified":"2012-04-17T17:09:43+09:00"},{"@type":"WebSite","@id":"https:\/\/tech.eshima.info\/#website","url":"https:\/\/tech.eshima.info\/","name":"\u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","description":"\u4e3b\u306b\u30a6\u30a7\u30d6\u95a2\u4fc2\u306e\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u30e1\u30e2\u3057\u307e\u3059","inLanguage":"ja","publisher":{"@id":"https:\/\/tech.eshima.info\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"\u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a | \u4e3b\u306b\u30a6\u30a7\u30d6\u95a2\u4fc2\u306e\u6280\u8853\u7684\u306a\u3053\u3068\u3092\u30e1\u30e2\u3057\u307e\u3059","og:type":"article","og:title":"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","og:description":"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $","og:url":"https:\/\/tech.eshima.info\/?p=85","article:published_time":"2012-04-17T07:44:55+00:00","article:modified_time":"2012-04-17T08:09:43+00:00","twitter:card":"summary","twitter:title":"cakePHP\u306eafterFind | \u6c5f\u5cf6\uff20\u30b7\u30b9\u30c6\u30e0\u958b\u767a","twitter:description":"find\u3067\u53d6\u5f97\u3059\u308b\u30c7\u30fc\u30bf\u306b\u8868\u793a\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u4ed8\u3051\u305f\u3044\u5834\u5408\u306fModel\u3067afterFind\u3002 public $"},"aioseo_meta_data":{"post_id":"85","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 03:54:56","updated":"2025-06-04 05:30:29","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tech.eshima.info\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tech.eshima.info\/?cat=10\" title=\"CakePHP\">CakePHP<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tcakePHP\u306eafterFind\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tech.eshima.info"},{"label":"CakePHP","link":"https:\/\/tech.eshima.info\/?cat=10"},{"label":"cakePHP\u306eafterFind","link":"https:\/\/tech.eshima.info\/?p=85"}],"_links":{"self":[{"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85"}],"version-history":[{"count":6,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=\/wp\/v2\/posts\/85\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/tech.eshima.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.eshima.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}