{"id":2094,"date":"2011-03-08T23:40:09","date_gmt":"2011-03-08T14:40:09","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/2094"},"modified":"2011-03-08T23:41:56","modified_gmt":"2011-03-08T14:41:56","slug":"php%e3%81%a7exdoc%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e6%ba%96%e5%82%99","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/2094","title":{"rendered":"PHP\u3067EXDoc\u3092\u4f5c\u3063\u3066\u307f\u308b(\u6e96\u5099)"},"content":{"rendered":"<p>\nC# \u3067\u5927\u65b9 EXDoc \u304c\u52d5\u3044\u305f\u306e\u3067\u3001\u672c\u547d(?)\u306e PHP \u3067\u52d5\u304b\u3057\u3066\u307f\u308b\u30c6\u30b9\u30c8\u3002<br \/>\n\u3044\u3084\u3001\u5358\u7d14\u306b\n<\/p>\n<p>\nPHP: \u30de\u30b8\u30c3\u30af\u30e1\u30bd\u30c3\u30c9 &#8211; Manual<br \/>\n<a href=\"http:\/\/www.php.net\/manual\/ja\/language.oop5.magic.php\">http:\/\/www.php.net\/manual\/ja\/language.oop5.magic.php<\/a>\n<\/p>\n<p>\n\u3092\u4f7f\u3048\u3070\u3001XML \u306e\u30bf\u30b0\u540d\u3084\u5c5e\u6027\u3092\u76f4\u63a5\u66f8\u3051\u308b\u306e\u3067\u306f\uff1f\u3068\u3044\u3046\u601d\u3044\u3064\u304d\u3067\u3059\u3002\n<\/p>\n<p>\n\u307e\u305a\u306f\u3001UIDD \u306b\u5f93\u3063\u3066\u3001\u3053\u3093\u306a\u98a8\u306b\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u305f\u3089\u3044\u3044\u306a\u3041\u3001\u3068\u3044\u3046\u30b3\u30fc\u30c9\u3092\u4f5c\u308a\u307e\u3059\u3002\n<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n$doc = new EXDoc();\n$els = $doc-&gt;members-&gt;person;\n$els = $doc-&gt;members-&gt;person(&amp;quot;name&amp;quot;)-&gt;eq(&amp;quot;masuda&amp;quot;);\n$doc-&gt;members-&gt;person(&amp;quot;name&amp;quot;)-&gt;value = &amp;quot;masuda&amp;quot;;\n<\/pre>\n<p>\n\u4f55\u3092\u3084\u3063\u3066\u3044\u308b\u304b\u5206\u304b\u308a\u307e\u3059\u3088\u306d\u3002PHP \u306e\u5834\u5408\u306f \/ \u6f14\u7b97\u5b50\u306a\u3069\u306e\u591a\u91cd\u5b9a\u7fa9\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u666e\u901a\u306b\u30e1\u30bd\u30c3\u30c9\/\u30d7\u30ed\u30d1\u30c6\u30a3\u547c\u51fa\u3057\u3092\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3001-> \u6f14\u7b97\u5b50\u306e\u3068\u3053\u308d\u3067\u3001\u76f4\u63a5 members \u3084\u3089 person \u3084\u3089\u3092\u66f8\u304f\u308f\u3051\u3067\u3059\u304c\u3001\u3053\u308c\u304c\u30e1\u30bd\u30c3\u30c9\u540d\u3060\u3063\u305f\u308a\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3060\u3063\u305f\u5229\u3059\u308b\u8a33\u3067\u3059\u3002\n<\/p>\n<p>\n\u3067\u3001\u5f53\u7136\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u304c\u3001PHP \u306e\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u66f8\u3044\u3066\u3042\u308b\u30de\u30b8\u30c3\u30af\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u3001\u672a\u5b9a\u7fa9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u30a8\u30e9\u30fc\u3092\u62fe\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\n<\/p>\n<p>\n\u3053\u308c\u306b\u5bfe\u51e6\u3057\u305f\u306e\u304c\u6b21\u306e\u4f8b\u3002\n<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nclass EXDoc\n{\n\tfunction __call($name,$args) {\n\t\tprint &amp;quot;func $name(&amp;quot;;\n\t\tforeach( $args as $a ) {\n\t\t\tprint &amp;quot;$a &amp;quot;;\n\t\t}\n\t\tprint &amp;quot;)\\n&amp;quot;;\n\t\treturn new EXDoc();\n\t}\n\tfunction __get($name) {\n\t\tprint &amp;quot;get $name\\n&amp;quot;;\n\t\treturn new EXDoc();\n\t}\n\tfunction __set($name,$value) {\n\t\tprint &amp;quot;set $name $value\\n&amp;quot;;\n\t\treturn new EXDoc();\n\t}\n}\n<\/pre>\n<p>\nC# \u3088\u308a\u3082\u66f4\u306b\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002\u672a\u5b9a\u7fa9\u306e\u95a2\u6570\u3084\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001 __call __get, __set \u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u308c\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u3001\u3055\u3089\u308a\u3068 EXDoc \u3092 new \u3057\u3066\u8fd4\u3057\u3066\u3084\u308a\u307e\u3059\u3002\u3059\u308b\u3068\u3001\u5148\u306e\u30b3\u30fc\u30c9\u304c\u3059\u308b\u3059\u308b\u3068\u3068\u304a\u3063\u3066\u3001\u6b21\u306e\u5b9f\u884c\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\n<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\nD:\\work\\blog\\src\\php&gt;php ex001.php\nget members\nget person\nget members\nfunc person(name )\nfunc eq(masuda )\nget members\nfunc person(name )\nset value masuda\n<\/pre>\n<p>\n\u898b\u4e8b\u306b\u30a8\u30e9\u30fc\u3082\u51fa\u3055\u305a\u306b\u3001\u76ee\u7684\u304c(\u534a\u5206\u3060\u3051)\u9054\u6210\u30c3!!!<br \/>\n# \u78ba\u304b\u3001Ruby \u306b\u306f\u52d5\u7684\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f5c\u308b\u65b9\u6cd5\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001PHP \u306e\u3088\u3046\u306b\u672a\u5b9a\u7fa9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u62fe\u3046\u3053\u3068\u304c\u3067\u304d\u305f\u304b\u3069\u3046\u304b\u306f\u4e0d\u660e\u3067\u3059\u3002\n<\/p>\n<p>\n\u3042\u3068\u306f\u3001\u5185\u90e8\u7684\u306b SimleXML \u304b DOM \u3092\u4f7f\u3063\u3066\u64cd\u4f5c\u3059\u308c\u3070OK\u3063\u3066\u3053\u3068\u3067\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C# \u3067\u5927\u65b9 EXDoc \u304c\u52d5\u3044\u305f\u306e\u3067\u3001\u672c\u547d(?)\u306e PHP \u3067\u52d5\u304b\u3057\u3066\u307f\u308b\u30c6\u30b9\u30c8\u3002 \u3044\u3084\u3001\u5358\u7d14\u306b PHP: \u30de\u30b8\u30c3\u30af\u30e1\u30bd\u30c3\u30c9 &#8211; Manual http:\/\/www.php.net\/manual\/ja\/la &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/2094\">\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_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,26,27],"tags":[],"class_list":["post-2094","post","type-post","status-publish","format-standard","hentry","category-dev","category-uidd","category-exdoc"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2094","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=2094"}],"version-history":[{"count":3,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2094\/revisions"}],"predecessor-version":[{"id":2097,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2094\/revisions\/2097"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=2094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=2094"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=2094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}