{"id":1994,"date":"2011-02-05T01:06:42","date_gmt":"2011-02-04T07:06:42","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/1994"},"modified":"2011-02-05T01:18:47","modified_gmt":"2011-02-04T16:18:47","slug":"%e3%82%aa%e3%83%ac%e3%82%aa%e3%83%ac-mvc-%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b2","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/1994","title":{"rendered":"\u30aa\u30ec\u30aa\u30ec MVC \u3092\u4f5c\u3063\u3066\u307f\u308b(2)"},"content":{"rendered":"<p>\n\u30aa\u30ec\u30aa\u30ec MVC \u3092\u4f5c\u3063\u3066\u307f\u308b(1) | Moonmile Solutions Blog<br \/>\n<a href=\"http:\/\/www.moonmile.net\/blog\/archives\/1861\">http:\/\/www.moonmile.net\/blog\/archives\/1861<\/a>\n<\/p>\n<p>\n\u524d\u56de\u306e\u30b3\u30fc\u30c9\u3092\u5c11\u3057\u5909\u66f4\u3057\u3066 wordpress \u306e\u30ab\u30c6\u30b4\u30ea\u4e00\u89a7\u3068\u30ab\u30c6\u30b4\u30ea\u5185\u306e\u8a18\u4e8b\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002\n<\/p>\n<p>\n\u25a0\u6700\u521d\u306e index.php\n<\/p>\n<p>\n\u307e\u305a\u306f\u3001\u30af\u30e9\u30b9\u540d\u3068\u30e1\u30bd\u30c3\u30c9\u3092\u53d6\u308a\u51fa\u3059 index.php \u304b\u3089\u3002\n<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot;\/&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;?php<br \/>\n$url = $_GET[&#8216;url&#8217;];<br \/>\n$url = strtolower($url);<\/p>\n<p>$vars =  preg_split(&#8216;|\/|&#8217;,$url);<br \/>\n$params = array();<br \/>\nif ( count($vars) == 1 ) {<br \/>\n\t$base = $url;<br \/>\n\t$method = &quot;index&quot;;<br \/>\n} else if ( count($vars) == 2 ) {<br \/>\n\t$base = $vars[0];<br \/>\n\t$method = $vars[1];<br \/>\n} else {<br \/>\n\t$base = $vars[0];<br \/>\n\t$method = $vars[1];<br \/>\n\tfor($i=2; $i&lt;count($vars); $i++ ) {<br \/>\n\t\t$params[] = $vars[$i];<br \/>\n\t}<br \/>\n}<br \/>\n$classfile = $base.&quot;_controller.php&quot;;<br \/>\n$classname = strtoupper(substr($base,0,1)).substr($base,1).&#8217;Controller&#8217;;<\/p>\n<p>echo &quot;classfile: $classfile&lt;br\/&gt;&quot;;<br \/>\necho &quot;classname: $classname&lt;br\/&gt;&quot;;<br \/>\necho &quot;method: $method&lt;br\/&gt;&quot;;<br \/>\necho &quot;param: &quot;;print_r($params); echo &quot;&lt;br\/&gt;&quot;;<\/p>\n<p>include(&#8216;controllers\/&#8217;.$classfile);<br \/>\n$c = new ReflectionClass($classname);<br \/>\n$obj = $c-&gt;newInstance();<br \/>\n$method = $c-&gt;getMethod($method);<br \/>\n$method-&gt;invokeArgs($obj,$params);<br \/>\n?&gt;<br \/>\n&lt;\/body&gt;<br \/>\n[\/code]<\/p>\n<p>\nGET \u3067\u9001\u3089\u308c\u308b URL \u304b\u3089\u300c\/\u300d\u3067\u30d1\u30fc\u30b9\u3059\u308b\u3068\u3053\u308d\u306f\u540c\u3058\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d7\u3051\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u3053\u308c\u306e\u96e3\u70b9\u306f\u5e38\u306b body \u30bf\u30b0\u5185\u306b view \u306e\u30b3\u30fc\u30c9\u304c\u5165\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3059\u3088\u306d\u3002\u4e00\u65e6\u4ed6\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u4efb\u305b\u3066\u3001\u305d\u306e\u4e2d\u3067 view \u306e\u30b3\u30fc\u30c9\u3092\u547c\u3076\u3088\u3046\u306b\u3057\u306a\u3044\u3068\u3001head \u30bf\u30b0\u306a\u3069\u304c\u66f8\u304d\u51fa\u305b\u307e\u305b\u3093\u3002\n<\/p>\n<p>\n\u25a0\u30d3\u30e5\u30fc\u3092\u4f5c\u308b\n<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n&lt;!&#8211; views\/categories\/item.php &#8211;&gt;<br \/>\n&lt;h1&gt;\u30ab\u30c6\u30b4\u30ea\u4e00\u5185\u306e\u8a18\u4e8b&lt;\/h1&gt;<br \/>\n&lt;table&gt;<br \/>\n\t&lt;tr&gt;<br \/>\n\t\t&lt;th&gt;Post.id&lt;\/th&gt;<br \/>\n\t\t&lt;th&gt;Post.post_title&lt;\/th&gt;<br \/>\n\t\t&lt;th&gt;User.display_name&lt;\/th&gt;<br \/>\n\t\t&lt;th&gt;Post.post_date&lt;\/th&gt;<br \/>\n\t\t&lt;th&gt;Post.guid&lt;\/th&gt;<br \/>\n\t&lt;\/tr&gt;<br \/>\n\t&lt;?php foreach($Categories as $item) : ?&gt;<br \/>\n\t&lt;tr&gt;<br \/>\n\t\t&lt;td&gt;&lt;?php echo $item[&#8216;Post&#8217;][&#8216;id&#8217;]; ?&gt;&lt;\/td&gt;<br \/>\n\t\t&lt;td&gt;&lt;?php echo $item[&#8216;Post&#8217;][&#8216;post_title&#8217;]; ?&gt;&lt;\/td&gt;<br \/>\n\t\t&lt;td&gt;&lt;?php echo $item[&#8216;User&#8217;][&#8216;display_name&#8217;]; ?&gt;&lt;\/td&gt;<br \/>\n\t\t&lt;td&gt;&lt;?php echo $item[&#8216;Post&#8217;][&#8216;post_date&#8217;]; ?&gt;&lt;\/td&gt;<br \/>\n\t\t&lt;td&gt;&lt;?php echo $item[&#8216;Post&#8217;][&#8216;guid&#8217;]; ?&gt;&lt;\/td&gt;<br \/>\n\t&lt;\/tr&gt;<br \/>\n\t&lt;?php endforeach; ?&gt;<br \/>\n&lt;\/table&gt;<br \/>\n[\/code]<\/p>\n<p>\n\u30d3\u30e5\u30fc\u306e\u4f5c\u308a\u306f CakePHP \u306e *.ctp \u3068\u540c\u3058\u3002\u3053\u306e\u3042\u305f\u308a\u306f\u4e92\u63db\u304c\u4fdd\u3066\u3066\u697d\u3061\u3093\u3002\n<\/p>\n<p>\n\u25a0\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f5c\u308b\n<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n&lt;?php<br \/>\ninclude &#8216;models\/category.php&#8217;;<br \/>\nclass CategoriesController {<br \/>\n\tvar $name = &#8216;CategoriesController&#8217;;<br \/>\n\tfunction index() {<br \/>\n\t\t\/\/ view \u306b\u6e21\u3059\u5909\u6570<br \/>\n\t\tglobal $Categories;<br \/>\n\t\t\/\/ \u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u3066<br \/>\n\t\t$category = new Category();<br \/>\n\t\t\/\/ \u691c\u7d22<br \/>\n\t\t$Categories = $category-&gt;find(&#8216;all&#8217;);<br \/>\n\t\tinclude(&#8216;views\/categories\/index.php&#8217;);<br \/>\n\t}<br \/>\n\tfunction item($slug) {<br \/>\n\t\t\/\/ view \u306b\u6e21\u3059\u5909\u6570<br \/>\n\t\tglobal $Categories;<br \/>\n\t\t\/\/ \u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u3066<br \/>\n\t\t$category = new Category();<br \/>\n\t\t\/\/ \u691c\u7d22<br \/>\n\t\t$Categories = $category-&gt;findBySlug($slug,10);<br \/>\n\t\tinclude(&#8216;views\/categories\/item.php&#8217;);<br \/>\n\t}<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/code]<\/p>\n<p>\n\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306f\u3001\u30e2\u30c7\u30eb\u3092 new \u3057\u3066\u304b\u3089\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u3060\u3051\u3002\u6700\u5f8c\u306b view \u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u3066\u8868\u793a\u3063\u3066\u306a\u5177\u5408\u3067\u3059\u3002\u3053\u306e include \u90e8\u5206\u3092\u5909\u3048\u3066 index.php \u3068\u306e\u9023\u643a\u3092\u53d6\u3089\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u306d\u3002\n<\/p>\n<p>\n\u25a0\u30e2\u30c7\u30eb\u306e\u57fa\u5e95\u30af\u30e9\u30b9\u3092\u4f5c\u308b\n<\/p>\n<p>\n\u30e2\u30c7\u30eb\u306e\u57fa\u5e95\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\n<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n&lt;?php<br \/>\nclass Model {<br \/>\n\tvar $cn ;<br \/>\n\tfunction open() {<br \/>\n\/\/\t\t$this-&gt;cn = new PDO(&quot;mysql:host=127.0.0.1;dbname=moonmile_cake&quot;,<br \/>\n\/\/\t\t\t&quot;moonmile_cake&quot;,&quot;cakephp&quot;);<br \/>\n\t\t$this-&gt;cn = new PDO(&quot;mysql:host=127.0.0.1;dbname=wordpress&quot;,<br \/>\n\t\t\t&quot;wordpress&quot;,&quot;wordpress&quot;);<br \/>\n\t}<br \/>\n\tfunction close() {<br \/>\n\t\t$this-&gt;cn = null;<br \/>\n\t}<br \/>\n\tfunction query($sql) {<br \/>\n\t\t$this-&gt;open();<br \/>\n\t\t$results = $this-&gt;cn-&gt;query($sql);<br \/>\n\t\t$this-&gt;close();<br \/>\n\t\treturn $this-&gt;toArray($results);<br \/>\n\t}<br \/>\n\tfunction toArray($stmt) {<br \/>\n\t\t$items = array();<br \/>\n\t\tforeach($stmt as $item) {<br \/>\n\t\t\tforeach($item as $key =&gt; $value) {<br \/>\n\t\t\t\tif (strpos($key,&#8217;.&#8217;) == true ) {<br \/>\n\t\t\t\t\tlist($table,$column) = split(&#8216;\\.&#8217;,$key);<br \/>\n\t\t\t\t\t$tables[$table][$column] = $value;<br \/>\n\t\t\t\t}<br \/>\n\t\t\t}<br \/>\n\t\t\t$items[] = $tables;<br \/>\n\t\t}<br \/>\n\t\treturn $items ;<br \/>\n\t}<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/code]<\/p>\n<p>\n\u3072\u3068\u307e\u305a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e open \u3068 close \u306f\u3001\u3053\u3053\u304b\u3089\u7d99\u627f\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3068\u3002\u5f8c\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u5f8c\u3067\u914d\u5217\u306b\u76f4\u3059\u306e\u304c\u524d\u56de\u306f\u3060\u3055\u304b\u3063\u305f\u306e\u3067\u3001toArray \u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u3063\u3066\u81ea\u52d5\u5316\u3057\u307e\u3059\u3002\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u3001Term.term_id \u306e\u3088\u3046\u306a\u540d\u524d\u3092\u30af\u30a8\u30ea\u3067\u4ed8\u3051\u3066\u304a\u3051\u3070 $item[&#8216;Term&#8217;][&#8216;term_id&#8217;]\u306e\u3088\u3046\u306b\u53c2\u7167\u304c\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<p>\n\u25a0\u30e2\u30c7\u30eb\u3092\u4f5c\u308b\n<\/p>\n<p>\n\u3053\u306e\u57fa\u5e95\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3057\u3066 Category \u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u307e\u3059\u3002\n<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n&lt;?php<br \/>\nrequire(&#8216;lib\/model.php&#8217;);<\/p>\n<p>class Category extends Model {<br \/>\n\tvar $name = &#8216;Category&#8217;;<br \/>\n\tfunction find($type) {<br \/>\n\t\t$sql = &lt;&lt;&lt; HERE<br \/>\nselect<br \/>\n\tTerm.term_id\t`Category.term_id`,<br \/>\n\tTerm.name\t\t`Category.name`,<br \/>\n\tTerm.slug\t\t`Category.slug`<br \/>\nfrom<br \/>\n\twp_terms as Term<br \/>\n  \tinner join wp_term_taxonomy as TermTaxonomy<br \/>\n  \ton ( Term.term_id = TermTaxonomy.term_id )<br \/>\nWHERE<br \/>\n\tTermTaxonomy.taxonomy = &#8216;category&#8217;<br \/>\n\torder by Term.term_id<br \/>\n;<br \/>\nHERE;<br \/>\n\t\t$items = $this-&gt;query($sql);<br \/>\n\t\treturn $items ;<br \/>\n\t}<\/p>\n<p>\tfunction findBySlug($slug,$max) {<br \/>\n\t\t$sql = &lt;&lt;&lt; HERE<br \/>\nselect<br \/>\n\tPost.ID\t\t\t\t`Post.id`,<br \/>\n\tPost.post_title\t\t`Post.post_title`,<br \/>\n\tUser.display_name\t`User.display_name`,<br \/>\n\tPost.post_date\t\t`Post.post_date`,<br \/>\n\tPost.guid\t\t\t`Post.guid`<br \/>\nfrom<br \/>\n\twp_terms as Term<br \/>\n  \tinner join wp_term_taxonomy as TermTaxonomy<br \/>\n  \ton ( Term.term_id = TermTaxonomy.term_id )<br \/>\n\tinner join wp_term_relationships as TermRelationship<br \/>\n\ton ( TermTaxonomy.term_taxonomy_id = TermRelationship.term_taxonomy_id )<br \/>\n\tinner join wp_posts as Post<br \/>\n\ton ( TermRelationship.object_id = Post.ID )<br \/>\n  inner join wp_users as User<br \/>\n  on ( Post.post_author = User.ID )<br \/>\nWHERE<br \/>\n\tTermTaxonomy.taxonomy = &#8216;category&#8217;<br \/>\nAND Post.post_status = &#8216;publish&#8217;<br \/>\nAND Term.slug = &#8216;$slug&#8217;<br \/>\n\torder by Post.post_date desc<br \/>\n\tlimit $max ;<br \/>\nHERE;<br \/>\n\t\t$items = $this-&gt;query($sql);<br \/>\n\t\treturn $items ;<br \/>\n\t}<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/code]<\/p>\n<p>\n\u5b8c\u5168\u306b\u30af\u30a8\u30ea\u3092\u66f8\u304f\u3068\u3044\u3046\u3053\u3068\u3067\u3001<b>\u975e\u81ea\u52d5\u5316 O\/R \u30de\u30c3\u30d4\u30f3\u30b0<\/b>\u30c3!!! SQL \u3092\u5206\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3053\u308c\u3067\u3082\u5341\u5206\u304b\u306a\u3041\u3068\u3002\u4e0b\u624b\u306b Model::$belongsTo \u7b49\u3067\u60a9\u3080\u3088\u308a\u306f\u3001\u3068\u8003\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n\u4f59\u8ac7\u3067\u3059\u304c\u3001CakePHP \u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306f\u3001LINQ to Entities \u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u3088\u3046\u306b\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u304b\u3064\u30c0\u30a4\u30a2\u30ed\u30b0\u7b49\u3067\u5165\u529b\u3057\u3066\u304b\u3089\u3001\u30b3\u30fc\u30c9\u306b\u76f4\u3057\u3066\u3084\u308c\u3070\u826f\u3044\u304b\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002LINQ to Entities \u306e\u8a2d\u5b9a\u3063\u3066 XML \u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3055\u308c\u308b\u306e\u3067\u3001\u540c\u69d8\u306b CakePHP \u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3092 XML \u306b\u8a2d\u5b9a\u3057\u3066\u304a\u3044\u3066\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3063\u3066\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u306d\u3002\n<\/p>\n<p>\n\u3053\u306e\u30aa\u30ec\u30aa\u30ec MVC \u306e O\/R \u30de\u30c3\u30d4\u30f3\u30b0\u306f\u5b8c\u5168\u306b SQL \u6587\u3092\u66f8\u304f\u3057\u304b\u306a\u3044\u4f53\u5236\u306a\u306e\u3067\u3001\u3053\u306e\u90e8\u5206\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u3066 MySQL Workbench \u3067\u5b9f\u884c\u3057\u3066\u30c1\u30a7\u30c3\u30af\u3063\u3066\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u306e\u3067\u3001inner join \u3092\u4f7f\u3063\u3066\u304d\u3063\u3061\u308a\u7d50\u5408\u3055\u305b\u307e\u3059\u3002\n<\/p>\n<p>\n\u25a0\u5b9f\u884c\u3057\u3066\u307f\u308b\n<\/p>\n<p>\n\u3053\u308c\u3060\u3051\u306e\u30b3\u30fc\u30c9\u3067 MVC \u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059(\u975e\u5e38\u306b\u30c1\u30fc\u30d7\u3067\u3059\u304c)\u3002\n<\/p>\n<p>\n\u25bc\u30ab\u30c6\u30b4\u30ea\u4e00\u89a7<br \/>\n<a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/02\/wpid-dworkblogimage20110205_01org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/02\/wpid-dworkblogimage20110205_01thum.jpg'\/><\/a>\n<\/p>\n<p>\n\u25bc\u30ab\u30c6\u30b4\u30ea\u5185\u306e\u8a18\u4e8b<br \/>\n<a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/02\/wpid-dworkblogimage20110205_02org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/02\/wpid-dworkblogimage20110205_02thum.jpg'\/><\/a>\n<\/p>\n<p>\n\u307e\u3041\u3001\u3053\u308c\u3060\u3068\u30ea\u30b9\u30c8\u306e\u8868\u793a\u3057\u304b\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u304a\u6b21\u306f insert, update, delete \u3067\u3059\u306d\u3002\u3044\u3084\u3001\u305d\u306e\u524d\u306b\u30ec\u30a4\u30a2\u30a6\u30c8\u8aad\u307f\u8fbc\u307f\u3092\u3055\u305b\u306a\u3044\u3068\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30aa\u30ec\u30aa\u30ec MVC \u3092\u4f5c\u3063\u3066\u307f\u308b(1) | Moonmile Solutions Blog http:\/\/www.moonmile.net\/blog\/archives\/1861 \u524d\u56de\u306e\u30b3\u30fc\u30c9\u3092\u5c11\u3057\u5909\u66f4\u3057\u3066 wordpres &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/1994\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3,20],"tags":[],"class_list":["post-1994","post","type-post","status-publish","format-standard","hentry","category-dev","category-cakephp"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=1994"}],"version-history":[{"count":2,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1994\/revisions"}],"predecessor-version":[{"id":1996,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/1994\/revisions\/1996"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=1994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=1994"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=1994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}