{"id":113,"date":"2016-06-01T14:35:02","date_gmt":"2016-06-01T06:35:02","guid":{"rendered":"http:\/\/zsaber.com\/blog\/?p=113"},"modified":"2019-08-26T15:45:23","modified_gmt":"2019-08-26T07:45:23","slug":"zfframework-%e4%b8%ad%e7%94%a8%e5%88%b0%e7%9a%84%e4%b8%80%e4%ba%9b%e6%8a%80%e5%b7%a7%e6%94%b6%e9%9b%86","status":"publish","type":"post","link":"http:\/\/zsaber.com\/blog\/p\/113","title":{"rendered":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6"},"content":{"rendered":"<p>\u64b8 <a href=\"http:\/\/ZFFramework.com\">ZFFramework<\/a> \u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86, \u671f\u95f4\u79ef\u7d2f\u4e86\u4e0d\u5c11\u7ecf\u9a8c,<br \/>\n\u59d1\u4e14\u7559\u4e2a\u6587\u505a\u4e2a\u8bb0\u5f55<\/p>\n<h1>\u8bbe\u8ba1\u76f8\u5173<\/h1>\n<h2>\u8de8\u5e73\u53f0\u7684\u5b9e\u73b0<\/h2>\n<p>\u91c7\u7528 <code>core + protocol [+ implementation]<\/code> \u7684\u8bbe\u8ba1, \u4e0d\u540c\u4e8e\u5927\u591a\u6570\u8de8\u5e73\u53f0\u6846\u67b6, ZF \u7684 implementation \u5c42\u90fd\u662f\u52a8\u6001\u6ce8\u518c\u7684<\/p>\n<p>\u4f18\u70b9:<\/p>\n<ul>\n<li>implementation \u53ea\u5728\u5bf9\u5e94\u6a21\u5757\u88ab\u4f7f\u7528\u5230\u65f6\u662f\u5fc5\u987b\u7684, \u53ef\u4ee5\u65b9\u4fbf\u7684\u505a\u6a21\u5757\u5316\u548c\u529f\u80fd\u88c1\u51cf<\/li>\n<li>\u6709\u5229\u4e8e\u5c06\u5e73\u53f0\u5b9e\u73b0\u5c42\u62c6\u5206\u51fa\u53bb, \u8981\u77e5\u9053 C\u8279 \u4e16\u754c\u91cc\u9762\u6298\u817e\u73af\u5883\u548c\u7f16\u8bd1\u9009\u9879\u53ef\u662f\u5f88\u9ebb\u70e6\u7684\u4e8b\u60c5,<br \/>\n\u6240\u4ee5\u5c3d\u91cf\u907f\u514d\u8fd9\u79cd\u9ebb\u70e6\u4e8b\u6c61\u67d3\u5230\u6838\u5fc3\u4ee3\u7801\u6240\u5c5e\u7684\u9879\u76ee<\/li>\n<\/ul>\n<p>\u7f3a\u70b9:<\/p>\n<ul>\n<li>\u867d\u7136\u5927\u591a\u6570\u573a\u666f\u4e0b\u53ef\u4ee5\u5ffd\u7565, \u4e0d\u8fc7\u591a\u5c11\u8fd8\u662f\u4f1a\u6709\u4e9b\u6027\u80fd\u95ee\u9898, \u9075\u5faa\u4e8c\u516b\u539f\u5219, \u603b\u4f1a\u6709\u90a3\u4e48\u4e9b\u4e1c\u897f\u9700\u8981\u4e3a\u4e86\u6027\u80fd\u800c\u653e\u5f03\u826f\u597d\u7684\u8bbe\u8ba1<\/li>\n<\/ul>\n<h2>\u52a8\u6001\u6ce8\u518c<\/h2>\n<p>ZF \u91cc\u9762\u5f88\u591a\u5b50\u529f\u80fd\u90fd\u91c7\u7528\u52a8\u6001\u6ce8\u518c\u7684\u8bbe\u8ba1, \u4f8b\u5982:<\/p>\n<ul>\n<li>\u6307\u5b9a\u7c7b\u578b\u7684\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u7684\u6ce8\u518c, \u52a8\u6001\u6ce8\u518c\u6bcf\u4e2a\u7c7b\u578b<\/li>\n<li>file descriptor, \u4ece\u7eaf\u5b57\u7b26\u4e32\u6839\u636e\u6307\u5b9a\u89c4\u5219\u89e3\u6790\u51fa\u6570\u636e, \u52a8\u6001\u6ce8\u518c\u6bcf\u79cd\u89e3\u6790\u89c4\u5219<\/li>\n<li>object creator, \u4ece\u6307\u5b9a\u89c4\u5219\u521b\u5efa\u5bf9\u8c61, \u52a8\u6001\u6ce8\u518c\u6bcf\u79cd\u521b\u5efa\u89c4\u5219<\/li>\n<li>scroll view \u7684\u6eda\u52a8\u903b\u8f91\u548c\u6eda\u52a8\u6761, \u53ef\u4ee5\u66ff\u6362\u4e3a\u4e0d\u540c\u7684\u5b9e\u73b0<\/li>\n<\/ul>\n<p>\u52a8\u6001\u6ce8\u518c\u8bb2\u767d\u4e86\u4e5f\u662f\u4e3a\u4e86\u5b9e\u73b0\u6a21\u5757\u5316\u548c\u53ef\u6269\u5c55\u6027, \u8fd9\u90e8\u5206\u5176\u5b9e\u6ca1\u4ec0\u4e48\u6280\u672f\u542b\u91cf\u6240\u4ee5\u4e0d\u5570\u55e6\u4e86<\/p>\n<h2>\u89c2\u5bdf\u8005\u6a21\u5f0f<\/h2>\n<p>\u8fd9\u4e2a\u5f88 low \u7684\u8bbe\u8ba1\u5176\u5b9e\u662f\u5927\u591a\u6570\u573a\u666f\u4e0b\u6700\u597d\u7528\u7684, \u672c\u6765\u4e0d\u60f3\u5355\u72ec\u5217\u51fa\u6765,<br \/>\n\u4f46\u662f\u53d1\u73b0\u6700\u8fd1 Android SDK \u628a\u4e0d\u5c11 setListener \u63a5\u53e3\u66f4\u65b0\u4e3a addListener \u5c31\u8ba9\u4e0d\u5c11\u4eba\u5174\u594b\u4e0d\u5df2,<br \/>\n\u89c9\u5f97\u8fd8\u662f\u6709\u5fc5\u8981\u5217\u4e00\u4e0b<\/p>\n<p>\u6700\u5178\u578b\u7684\u53cd\u4f8b\u5176\u5b9e\u5c31\u662f\u5f88\u591a\u4eba\u7528\u7684\u6700\u591a\u7684, \u6bd4\u5982 Android \u91cc\u9762 setOnClickListener \u548c iOS \u91cc\u9762\u7684 delegate,<br \/>\n\u8fd9\u79cd\u53ea\u80fd\u6ce8\u518c\u4e00\u4e2a\u7684\u8bbe\u8ba1\u975e\u5e38\u4e0d\u5229\u4e8e\u6a21\u5757\u5316\u548c\u529f\u80fd\u6269\u5c55<\/p>\n<p>\u4f5c\u4e3a\u6700\u7b80\u5355\u6613\u884c\u5374\u6700\u5b9e\u7528\u7684\u8bbe\u8ba1\u6a21\u5f0f, \u8981\u505a\u597d\u8fd9\u4e2a\u5176\u5b9e\u5f88\u7b80\u5355, \u9996\u5148\u597d\u597d\u8bbe\u8ba1 &quot;\u4e8b\u4ef6&quot;, \u9996\u5148\u597d\u597d\u8bbe\u8ba1 &quot;\u4e8b\u4ef6&quot;, \u9996\u5148\u597d\u597d\u8bbe\u8ba1 &quot;\u4e8b\u4ef6&quot;,<br \/>\n\u7136\u540e\u6ce8\u610f\u76d1\u542c\u8981\u7528 add\/remove \u800c\u4e0d\u662f set \u5c31\u597d\u4e86<\/p>\n<h2>object tag<\/h2>\n<p>\u53c8\u662f\u4e00\u4e2a\u5f88 low \u4f46\u5f88\u597d\u7528\u7684\u8bbe\u8ba1, \u5728\u5355\u6839\u7ee7\u627f\u4f53\u7cfb\u4e0b\u975e\u5e38\u5b9e\u7528,<br \/>\n\u7b80\u5355\u8bb2\u5c31\u662f\u8fd9\u6837:<\/p>\n<pre><code class=\"language-cpp\">class Object\n{\n    map&lt;string, Object&gt; tags;\n};<\/code><\/pre>\n<p>\u8fd9\u79cd\u8bbe\u8ba1\u80fd\u591f\u5f88\u65b9\u4fbf\u7684\u5bf9\u5df2\u6709\u4ee3\u7801\u8fdb\u884c\u6269\u5c55, \u65b0\u589e\u529f\u80fd\u7684\u989d\u5916\u72b6\u6001\u53ef\u4ee5\u4fdd\u5b58\u5728 tag \u4e2d, \u800c\u4e0d\u9700\u8981\u5f71\u54cd\u539f\u6709\u7684\u4efb\u4f55\u4ee3\u7801<\/p>\n<p>\u5176\u5b9e\u66f4\u8fdb\u4e00\u6b65\u7684\u662f Object-C \u91cc\u9762\u8bed\u6cd5\u7ea7\u522b\u63d0\u4f9b\u7684\u529f\u80fd &quot;category&quot;, \u8fd9\u4e2a\u771f\u662f\u4e00\u4e2a\u975e\u5e38\u975e\u5e38\u597d\u7684\u8bbe\u8ba1, \u53ef\u60dc C\u8279 \u65e0\u6cd5\u4f18\u96c5\u7684\u5b9e\u73b0<\/p>\n<h2>\u5206\u5c42 view<\/h2>\n<p>\u8fd9\u4e2a\u4e5f\u662f\u4e3a\u4e86\u5b9e\u73b0\u6269\u5c55\u6027\u800c\u5f15\u5165\u7684\u4e00\u4e2a\u8bbe\u8ba1, \u7b80\u5355\u7684\u8bf4\u5c31\u662f\u6bcf\u4e2a view \u53ef\u4ee5\u5206\u5c42\u63d2\u5165\u5b50\u5143\u7d20, \u5404\u4e2a\u5c42\u4e4b\u95f4\u4e92\u4e0d\u5f71\u54cd, \u4f2a\u4ee3\u7801\u5dee\u4e0d\u591a\u662f\u8fd9\u4e2a\u6837\u5b50:<\/p>\n<pre><code class=\"language-cpp\">class View\n{\n    vector&lt;View&gt; bgViews;\n    vector&lt;View&gt; views;\n    vector&lt;View&gt; fgViews;\n};<\/code><\/pre>\n<p>\u5217\u4e3e\u51e0\u4e2a\u5178\u578b\u7684\u4f7f\u7528\u573a\u666f, \u770b\u770b\u5404\u4f4d\u5728\u81ea\u5df1\u719f\u6089\u7684\u6846\u67b6\u4e0b\u8981\u5982\u4f55\u4f18\u96c5\u7684\u5b9e\u73b0:<\/p>\n<ul>\n<li>\u7ed9\u5df2\u6709\u7684\u6309\u94ae\u7c7b\u6dfb\u52a0\u4e00\u4e2a\u53f3\u4e0a\u89d2 &quot;new&quot; \u7684\u5c0f\u56fe\u6807<\/li>\n<li>\u67d0\u4e2a view \u88ab\u70b9\u51fb\u65f6, \u81ea\u52a8\u95ea\u70c1\u4e00\u4e0b<\/li>\n<\/ul>\n<h2>\u9759\u6001\u53cd\u5c04 vs \u52a8\u6001\u53cd\u5c04<\/h2>\n<p>C\u8279 \u5176\u5b9e\u5df2\u6709\u4e0d\u5c11\u53cd\u5c04\u5e93, \u4e0d\u8fc7\u7531\u4e8e C\u8279 \u7684\u6a21\u677f\u7684\u7279\u6b8a\u6027, \u5927\u7ea6\u53ef\u4ee5\u5206\u4e3a\u4e24\u79cd<\/p>\n<ul>\n<li>\n<p>\u9759\u6001\u53cd\u5c04<\/p>\n<p>\u5178\u578b\u4e3a boost, \u5229\u7528 template traits \u548c bind \u7b49\u6280\u672f, \u76f4\u63a5\u8bbf\u95ee\u539f\u59cb\u6570\u636e<\/p>\n<p>\u4f18\u70b9\u662f\u6027\u80fd\u975e\u5e38\u597d, \u7f3a\u70b9\u662f\u4e0d\u591f\u7075\u6d3b, \u5927\u591a\u9700\u8981\u663e\u5f0f\u7684\u901a\u8fc7\u7279\u5316\u7684\u6a21\u677f\u6765\u8bbf\u95ee,<br \/>\n\u7528\u5b57\u7b26\u4e32\u53cd\u5c04\u7b49\u65b9\u5f0f\u7528\u8d77\u6765\u5c31\u6bd4\u8f83\u65e0\u529b<\/p>\n<p>\u5178\u578b\u9002\u7528\u573a\u666f\u4e3a\u7f51\u7edc\u901a\u8baf\u6216\u8ba1\u7b97\u5bc6\u96c6\u578b\u4e1a\u52a1, \u4e00\u662f\u9700\u8981\u6027\u80fd, \u4e8c\u662f\u4e1a\u52a1\u7ed3\u6784\u76f8\u5bf9\u786e\u5b9a\u800c\u4e14\u7ed3\u6784\u6e05\u6670<\/p>\n<\/li>\n<li>\n<p>\u52a8\u6001\u53cd\u5c04<\/p>\n<p>\u5178\u578b\u4e3a Qt, \u5229\u7528\u5404\u79cd\u65b9\u5f0f\u6ce8\u518c meta data, \u7136\u540e\u901a\u8fc7\u5b57\u7b26\u4e32\u67e5\u627e\u6765\u627e\u5230\u5730\u5740\u6216\u56de\u8c03\u51fd\u6570<\/p>\n<p>\u4f18\u70b9\u662f\u975e\u5e38\u7075\u6d3b, \u53ef\u4ee5\u52a8\u6001\u6ce8\u518c, \u53ef\u4ee5\u4e0d\u9700\u8981\u77e5\u9053\u5b9e\u9645\u7c7b\u578b (\u591a\u5c11\u6709\u70b9\u7c7b\u4f3c\u591a\u6001),<br \/>\n\u7f3a\u70b9\u662f\u6027\u80fd\u8f83\u5dee, \u800c\u4e14 &quot;\u6ce8\u518c&quot; \u672c\u8eab\u4e5f\u633a\u9ebb\u70e6\u7684, \u50cf Qt \u9700\u8981 moc, MFC \u9700\u8981\u5404\u79cd\u96be\u770b\u7684\u5b8f<\/p>\n<p>\u5178\u578b\u9002\u7528\u573a\u666f\u4e3a UI \u6a21\u5757\u6216\u4e0a\u5c42\u4e1a\u52a1, \u56e0\u4e3a\u8fd9\u4e9b\u73a9\u610f\u513f\u5927\u591a\u975e\u5e38\u7e41\u6742, \u6d89\u53ca\u5230\u7684\u7c7b\u578b\u53c8\u591a,<br \/>\n\u5982\u679c\u7528\u9759\u6001\u65b9\u5f0f\u6765\u5b9e\u73b0, \u6240\u6709\u4e1c\u897f\u90fd\u9700\u8981\u663e\u5f0f\u7533\u660e, \u5f88\u5bb9\u6613\u4ea7\u751f\u4e25\u91cd\u7684\u8026\u5408\u95ee\u9898<\/p>\n<p>\u9700\u8981\u66f4\u7075\u6d3b\u4e00\u70b9\u7684, \u5219\u90fd\u8d70\u811a\u672c\u8bed\u8a00\u7ed1\u5b9a\u4e86, \u5229\u7528\u7eaf\u52a8\u6001\u8bed\u8a00\u7684\u52a8\u6001\u7279\u6027\u6765\u73a9<\/p>\n<\/li>\n<\/ul>\n<p>\u626f\u4e86\u90a3\u4e48\u591a, \u4e5f\u5c31\u5bb9\u6613\u660e\u767d\u4e3a\u4ec0\u4e48\u6d89\u53ca\u5230 UI \u7684\u6846\u67b6\u57fa\u672c\u4e0a\u7528\u7684\u90fd\u662f\u52a8\u6001\u53cd\u5c04\u4e86<\/p>\n<h1>\u6280\u5de7\u76f8\u5173<\/h1>\n<h2>\u679a\u4e3e\u7684\u6570\u503c\u5316<\/h2>\n<p>\u679a\u4e3e\u5927\u5bb6\u90fd\u5f88\u719f\u4e86, \u7136\u800c\u66f4\u7ecf\u5e38\u7528\u5230\u7684\u5e76\u4e0d\u662f\u4e25\u683c\u610f\u4e49\u4e0a\u7684\u679a\u4e3e, \u5178\u578b\u7684\u5c31\u662f\u4e00\u4e9b\u4e8b\u4ef6\u5b9a\u4e49, \u8fd9\u79cd\u573a\u666f\u6709\u4ee5\u4e0b\u7279\u70b9:<\/p>\n<ul>\n<li>\u4e0d\u5f3a\u6c42\u503c\u5fc5\u987b\u5728\u7ed9\u5b9a\u8303\u56f4\u5185, \u6bd4\u5982\u968f\u65f6\u53ef\u4ee5\u65b0\u589e\u4e00\u4e2a\u503c<\/li>\n<li>\u4e0d\u5173\u5fc3\u6bcf\u9879\u7684\u5177\u4f53\u503c, \u53ea\u8981\u80fd\u4e0e\u5176\u5b83\u9879\u533a\u5206\u5f00\u5373\u53ef<\/li>\n<\/ul>\n<p>\u4e8e\u662f\u5927\u591a\u6570\u4e60\u60ef\u7684\u505a\u6cd5\u662f\u4f7f\u7528\u5b57\u7b26\u4e32:<\/p>\n<pre><code class=\"language-cpp\">class MyEvent {\n    string Event0 = &quot;Event0&quot;;\n    string Event1 = &quot;Event1&quot;;\n    string Event2 = &quot;Event2&quot;;\n}<\/code><\/pre>\n<p>\u7136\u800c\u5bf9\u4e8e\u679a\u4e3e\u6765\u8bf4, \u6bd4\u8f83\u7684\u65f6\u5019\u90a3\u4e9b\u5b57\u7b26\u4e32\u6bd4\u8f83\u64cd\u4f5c\u5c31\u663e\u5f97\u5f88\u591a\u4f59\u4e86<\/p>\n<p>\u6240\u4ee5 ZF \u91cc\u91c7\u7528 <code>map&lt;int, string&gt;<\/code> \u7684\u65b9\u5f0f\u6765\u5904\u7406\u4e8b\u4ef6\u5b9a\u4e49, \u679a\u4e3e\u503c\u52a8\u6001\u6ce8\u518c, int \u503c\u9012\u589e,<br \/>\n\u8fd9\u6837\u65e2\u4fdd\u8bc1\u4f7f\u7528\u5b57\u7b26\u4e32\u6765\u5b9a\u4e49\u4e8b\u4ef6\u7684\u4fbf\u6377, \u53c8\u4fdd\u8bc1\u679a\u4e3e\u503c\u4f7f\u7528\u65f6\u6574\u578b\u503c\u6bd4\u8f83\u7684\u9ad8\u6548<\/p>\n<h2>RAII<\/h2>\n<p>\u6ca1\u9519, \u8fd9\u4e2a\u5b66\u8fc7 C\u8279 \u7684\u4eba\u90fd\u61c2\u7684\u57fa\u672c\u8bbe\u8ba1, \u7528\u7684\u597d\u7684\u8bdd\u53ef\u4ee5\u51cf\u5c11\u5f88\u591a\u4ee3\u7801, \u4e0b\u9762\u8981\u63d0\u5230\u7684\u5168\u5c40\u521d\u59cb\u5316\u5c31\u662f RAII \u7684\u4e00\u4e2a\u5178\u578b\u4f7f\u7528\u573a\u666f<\/p>\n<p>\u5199\u8fc7 Object-C \u4ee3\u7801\u7684\u7ae5\u978b\u76f8\u4fe1\u5bf9 MRC \u4e0b\u7684 property \u90fd\u6709\u79cd\u53c8\u7231\u53c8\u6068\u7684\u611f\u89c9, \u56e0\u4e3a dealloc \u7684\u65f6\u5019\u90fd\u9700\u8981\u5bf9\u6240\u6709 retain property \u9010\u4e2a\u6e05\u7a7a,<br \/>\n\u8fd9\u4e2a\u5b9e\u5728\u592a\u9ebb\u70e6\u4e86<\/p>\n<p>\u7528 C\u8279 \u7684 RAII \u6765\u5b9e\u73b0\u5c31\u65b9\u4fbf\u591a\u4e86, \u7528\u4e00\u4e2a\u7a7a\u5bf9\u8c61\u53bb\u5305\u88c5\u4e00\u4e0b property \u7136\u540e\u5728\u6790\u6784\u51fd\u6570\u505a\u6e05\u7406\u64cd\u4f5c\u5373\u53ef<\/p>\n<p>\u7c7b\u4f3c\u7684\u4f7f\u7528\u4e5f\u5e7f\u6cdb\u7528\u4e8e\u667a\u80fd\u6307\u9488\u7b49\u8bbe\u8ba1\u4e2d<\/p>\n<h2>\u5168\u5c40\u521d\u59cb\u5316<\/h2>\n<p>\u4f20\u7edf\u6a21\u5757\u5316\u7684\u8bbe\u8ba1\u4e0d\u7ba1\u6a21\u5757\u5316\u505a\u7684\u591a\u597d, \u6700\u7ec8\u8fd8\u662f\u907f\u514d\u4e0d\u4e86\u9700\u8981\u4e00\u4e2a\u521d\u59cb\u5316\u5165\u53e3, \u6bd4\u5982\u9700\u8981\u5728\u7236\u6a21\u5757\u8c03\u7528\u4e00\u4e0b\u5b50\u6a21\u5757\u7684\u521d\u59cb\u5316\u51fd\u6570,<br \/>\n\u91cc\u9762\u5e72\u4e00\u4e9b\u8d44\u6e90\u521d\u59cb\u5316\u6216\u8005\u4e8b\u4ef6\u76d1\u542c\u7684\u6ce8\u518c\u7b49\u7b49<\/p>\n<p>ZF \u91cc\u9762\u5229\u7528 C\u8279 \u7279\u6709\u7684 RAII \u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898, \u8be6\u60c5\u53ef\u4ee5\u53c2\u89c1 <code>ZF_GLOBAL_INITIALIZER_INIT<\/code>,<br \/>\n\u7b80\u5355\u7684\u8bf4\u5c31\u662f\u5229\u7528\u4e00\u4e2a\u9759\u6001\u5168\u5c40\u53d8\u91cf\u7684\u6784\u9020\u51fd\u6570\u53bb\u505a\u4e00\u4e9b\u521d\u59cb\u5316\u7684\u64cd\u4f5c<\/p>\n<p>\u4f46\u662f\u548c\u4f20\u7edf C\u8279 \u7684\u5904\u7406\u65b9\u5f0f\u4e0d\u540c, \u5728\u9759\u6001\u5168\u5c40\u53d8\u91cf\u7684\u6784\u9020\u51fd\u6570\u8fd9\u8fb9\u53ea\u505a\u6ce8\u518c\u64cd\u4f5c, \u5b9e\u9645\u4e0a\u7684\u521d\u59cb\u5316\u662f\u5728 app \u542f\u52a8\u5b8c\u6210\u540e,<br \/>\n\u518d\u904d\u5386\u8fd9\u4e9b\u5df2\u6ce8\u518c\u7684\u5165\u53e3\u8fdb\u884c\u521d\u59cb\u5316\u64cd\u4f5c, \u8fd9\u6837\u505a\u7684\u597d\u5904, \u53ef\u4ee5\u660e\u786e\u7684\u63a7\u5236\u521d\u59cb\u5316\u987a\u5e8f\u548c\u4f9d\u8d56\u5173\u7cfb,<br \/>\n\u522b\u4ee5\u4e3a\u8fd9\u662f\u5c0f\u4e8b, \u6a21\u5757\u591a\u4e86, \u521d\u59cb\u5316\u987a\u5e8f\u7684\u4e0d\u786e\u5b9a\u53ef\u80fd\u4f1a\u9020\u6210\u5f88\u591a\u4e0d\u53ef\u9884\u671f\u7684\u95ee\u9898<\/p>\n<p>\u5177\u4f53\u5b9e\u73b0\u7684\u4f2a\u4ee3\u7801<\/p>\n<pre><code class=\"language-cpp\">\/\/ global\nclass InitializerData\n{\n    Level level;\n    Constructor constructor;\n    Object *instance;\n};\nstatic vector&lt;InitializerData&gt; initializerList;\nvoid mainInit(void)\n{\n    \/\/ \u6b64\u5904\u53ef\u4ee5\u6839\u636e level \u4eba\u4e3a\u63a7\u5236\u521d\u59cb\u5316\u987a\u5e8f\n    for_each(e in initializerList)\n    {\n        e.instance = e.constructor();\n    }\n}\n\n\/\/ actual initializer\nclass MyInitializer\n{\n    MyInitializer(void) { \/* actual init step *\/ }\n    ~MyInitializer(void) { \/* actual cleanup step *\/ }\n    static Object *constructor(void) {return new MyInitializer();}\n};\nclass MyInitializerRegister\n{\n    MyInitializerRegister(void)\n    {\n        initializerList.add(InitializerData(MyInitializer::constructor, MyLevel));\n    }\n};\nstatic MyInitializerRegister dummy;<\/code><\/pre>\n<h1>\u9879\u76ee\u76f8\u5173<\/h1>\n<h2>unity builds<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/unity_build.sh\">ZFFramework\/tools\/common\/unity_build.sh<\/a><\/p>\n<p>\u5173\u4e8e unity builds \u7684\u5404\u79cd\u4f18\u7f3a\u70b9\u53ef\u4ee5\u53c2\u8003 <a href=\"http:\/\/stackoverflow.com\/questions\/543697\/include-all-cpp-files-into-a-single-compilation-unit\">\u8fd9\u91cc<\/a>,<br \/>\nZF \u4e2d\u7528\u5230\u7684\u573a\u666f\u53ef\u4ee5\u53c2\u8003 <a href=\"http:\/\/zsaber.com\/blog\/p\/82\">\u8fd9\u91cc<\/a>,<br \/>\n\u8fd9\u91cc\u5c31\u4e0d\u5570\u55e6\u4e86<\/p>\n<h2>\u81ea\u52a8\u7f16\u8bd1\u811a\u672c<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/run_recursive.sh\">ZFFramework\/tools\/common\/run_recursive.sh<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/zfcleanup.sh\">ZFFramework\/zfcleanup.sh<\/a><\/p>\n<p>\u6a21\u5757\u5316\u5f00\u53d1\u662f\u4e2a\u5f88\u597d\u7684\u8bbe\u8ba1\u65b9\u5f0f, \u4e0d\u8fc7\u5e26\u6765\u7684\u95ee\u9898\u662f\u5404\u79cd\u9ebb\u70e6\u7684\u4f9d\u8d56\u5173\u7cfb, \u4e3b\u8981\u5305\u62ec:<\/p>\n<ul>\n<li>\u5404\u79cd <code>include ..\/..\/xxx<\/code> \u7684\u8def\u5f84\u95ee\u9898, \u4e00\u4e0d\u5c0f\u5fc3\u5c31\u591a\u5199\u6216\u5c11\u5199\u4e2a\u8def\u5f84<\/li>\n<li>\u65b0\u589e\u6216\u5220\u9664\u6a21\u5757, \u8fd8\u5f97\u540c\u6b65\u4fee\u6539\u914d\u7f6e<\/li>\n<\/ul>\n<p>\u4e8e\u662f\u641e\u4e86\u8fd9\u4e48\u4e2a\u4e1c\u897f, \u539f\u7406\u5f88\u7b80\u5355, \u9012\u5f52\u67e5\u627e\u6307\u5b9a\u6587\u4ef6\u540d\u524d\u7f00\u7684\u811a\u672c\u6587\u4ef6,<br \/>\n\u7136\u540e\u628a\u9879\u76ee\u6839\u76ee\u5f55\u6216\u8005\u91cd\u8981\u8def\u5f84\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u811a\u672c,<br \/>\n\u8fd9\u6837\u4e0d\u7ba1\u600e\u4e48\u632a\u600e\u4e48\u65b0\u589e\u6216\u5220\u9664\u6a21\u5757, \u90fd\u53ef\u4ee5\u4e0d\u7528\u6539\u52a8\u4ee3\u7801\u6216\u914d\u7f6e\u4e86<\/p>\n<p>\u540c\u6837, \u7b2c\u4e09\u65b9\u5e93\u4e5f\u53ef\u4ee5\u7528\u8fd9\u79cd\u65b9\u5f0f\u6765\u7ba1\u7406, \u53c2\u8003<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/zfsetup.sh\">ZFFramework\/zfsetup.sh<\/a><\/p>\n<p>\u8fd9\u6837, \u5b50\u6a21\u5757\u53ef\u4ee5\u81ea\u5df1\u7ba1\u7406\u81ea\u5df1\u7684\u4f9d\u8d56\u5173\u7cfb, \u800c\u4e0d\u9700\u8981\u540c\u65f6\u4fee\u6539\u5230\u7236\u6a21\u5757\u7684\u811a\u672c\u6587\u4ef6<\/p>\n<h2>\u8de8\u5e73\u53f0\u811a\u672c<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/zfsh.sh\">ZFFramework\/tools\/common\/zfsh.sh<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/release\/release.zfsh\">ZFFramework\/tools\/release\/release.zfsh<\/a><\/p>\n<p>\u811a\u672c\u662f\u4e2a\u597d\u7528\u7684\u73a9\u610f\u513f, \u64b8\u8de8\u5e73\u53f0\u4ee3\u7801\u81ea\u7136\u907f\u4e0d\u5f00\u5404\u79cd\u811a\u672c, \u7136\u800c:<\/p>\n<ul>\n<li>\u4e3a\u6bcf\u4e2a\u5e73\u53f0\u7ef4\u62a4\u4e00\u4efd\u811a\u672c\u4eca\u540e\u5f88\u96be\u7ef4\u62a4<\/li>\n<li>\u867d\u7136\u53ef\u4ee5\u5f15\u5165\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u811a\u672c\u73af\u5883 (\u4f8b\u5982 Windows \u4e0b\u7528 cygwin), \u7136\u800c\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u7f16\u8bd1\u4e2d\u7528\u5230\u7684\u811a\u672c\u53ea\u662f\u4e9b\u5f88\u57fa\u672c\u7684\u529f\u80fd,<br \/>\n\u6bd4\u5982\u590d\u5236\u4e9b\u6587\u4ef6, \u8c03\u7528\u7f16\u8bd1\u547d\u4ee4,<br \/>\n\u6709\u70b9\u6740\u9e21\u7528\u725b\u5200\u7684\u611f\u89c9<\/li>\n<li>\u6709\u4eba\u8bf4 cmake, \u5404\u5e73\u53f0\u914d\u4e00\u904d\u73af\u5883\u5c31\u591f\u4f60\u53d7\u7684\u4e86, \u66f4\u522b\u8bf4\u548c IDE \u6574\u5408\u7684\u95ee\u9898\u4e86<\/li>\n<\/ul>\n<p>\u6240\u4ee5\u6298\u817e\u4e86\u8fd9\u4e48\u4e2a\u73a9\u610f\u513f, \u539f\u7406\u5f88\u7b80\u5355, \u6309\u7167\u89c4\u5b9a\u7684\u683c\u5f0f\u5199, \u7136\u540e\u7eaf\u6587\u672c\u66ff\u6362\u540e\u518d\u6267\u884c\u5373\u53ef<\/p>\n<pre><code>POSIX         Windows          \u8fd9\u4ec0\u4e48 JB \u73a9\u610f\u513f\n# comment     rem comment      &lt;ZF_COMMENT&gt; comment\nA = &quot;$1&quot;      set A = &quot;%~1%&quot;   &lt;ZF_SET&gt; A = &quot;&lt;ZF_P1&gt;&quot;\nB = $A        set B = %A%      &lt;ZF_SET&gt; B = &lt;ZF_PL&gt;A&lt;ZF_PR&gt;\nsh $B.sh      call %B%.bat     &lt;ZF_SH&gt; &lt;ZF_PL&gt;B&lt;ZF_PR&gt;.&lt;ZF_SH_EXT&gt;<\/code><\/pre>\n<p>\u867d\u7136\u5b9e\u9645\u4e0a\u5199\u8d77\u6765\u53c8\u81ed\u53c8\u957f, \u4f46\u6bd5\u7adf\u53ea\u9700\u8981\u5199\u4e00\u4efd\u811a\u672c\u5373\u53ef<\/p>\n<p>\u5f53\u7136\u4e5f\u53ef\u4ee5\u505a\u6210\u5c06\u4e00\u4e2a\u5e73\u53f0\u7684\u811a\u672c &quot;\u7ffb\u8bd1&quot; \u6210\u53e6\u4e00\u4e2a\u5e73\u53f0\u7684\u8bed\u6cd5, \u4f46\u662f\u8fd9\u4e2a\u5b9e\u73b0\u8d77\u6765\u6bd4\u8f83\u56f0\u96be, \u800c\u4e14\u5728\u5f88\u591a\u7ec6\u8282\u95ee\u9898\u4e0a\u65e0\u6cd5\u505a\u7684\u6bd4\u8f83\u901a\u7528, \u5728\u8bed\u6cd5\u4e0a\u4e5f\u4f1a\u6709\u66f4\u591a\u9650\u5236<\/p>\n<h2>\u65f6\u95f4\u6233<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/git_check.sh\">ZFFramework\/tools\/common\/git_check.sh<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/timestamp_check.sh\">ZFFramework\/tools\/common\/timestamp_check.sh<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/common\/timestamp_save.sh\">ZFFramework\/tools\/common\/timestamp_save.sh<\/a><\/p>\n<p>ZF \u91cc\u9762, \u5728 app \u6784\u5efa\u9636\u6bb5, \u91c7\u7528\u811a\u672c\u81ea\u52a8\u66f4\u65b0\u6240\u6709\u7b2c\u4e09\u65b9\u5e93\u7684 git,<br \/>\n\u7136\u800c git \u672c\u8eab\u6ca1\u6709\u4ec0\u4e48\u7f13\u5b58\u7684\u53c2\u6570,<br \/>\n\u5bfc\u81f4\u6bcf\u6b21\u7f16\u8bd1\u8fd0\u884c\u7684\u65f6\u5019\u90fd\u8981\u53bb <code>git pull<\/code>,<br \/>\n\u975e\u5e38\u6d6a\u8d39\u65f6\u95f4, \u4e8e\u662f\u6298\u817e\u4e86\u8fd9\u4e48\u4e2a\u73a9\u610f\u513f<\/p>\n<p>\u6700\u8fd1\u4e00\u6b21 <code>git clone<\/code> \u6216 <code>git pull<\/code> \u4e4b\u540e, \u4fdd\u5b58\u5f53\u524d\u65f6\u95f4\u6233,<br \/>\n\u4e4b\u540e\u53ea\u8981\u6ca1\u6709\u8d85\u65f6, \u5c31\u4e0d\u518d\u53bb <code>git pull<\/code> \u4e86<\/p>\n<p>\u6709\u5176\u4ed6\u4ec0\u4e48\u8d39\u65f6\u64cd\u4f5c\u53c8\u4e0d\u9700\u8981\u6bcf\u6b21\u66f4\u65b0\u7684, \u4e5f\u53ef\u4ee5\u7528\u7c7b\u4f3c\u7684\u65b9\u5f0f\u6765\u73a9\u800d<\/p>\n<h2>\u5de5\u7a0b\u6587\u4ef6\u6a21\u677f<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/ZF\/ZFAlgorithm\/zfsrc\/ZFAlgorithm\/ZFTextTemplateRun.h\">ZFFramework\/ZF\/ZFAlgorithm\/zfsrc\/ZFAlgorithm\/ZFTextTemplateRun.h<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/ZF\/ZFAlgorithm\/zfsrc\/ZFAlgorithm\/ZFTextTemplate.h\">ZFFramework\/ZF\/ZFAlgorithm\/zfsrc\/ZFAlgorithm\/ZFTextTemplate.h<\/a>,<br \/>\n<a href=\"https:\/\/github.com\/ZFFramework\/ZFFramework\/blob\/master\/tools\/zfproj_creator\/zfproj_creator.sh\">ZFFramework\/tools\/zfproj_creator\/zfproj_creator.sh<\/a><\/p>\n<p>\u914d\u5de5\u7a0b\u6587\u4ef6\u662f\u4e2a\u5de8\u86cb\u75bc\u7684\u4e8b\u60c5, \u5373\u4f7f\u662f\u4ece\u4e00\u4e2a\u7a7a\u9879\u76ee\u65b0\u5efa,<br \/>\n\u4e5f\u8fd8\u5f97\u914d\u7f6e\u4e00\u5806\u9879\u76ee\u540d, \u4f9d\u8d56\u5173\u7cfb\u4ec0\u4e48\u7684,<br \/>\n\u5176\u5b9e\u91cc\u9762\u5f88\u591a\u4e1c\u897f\u90fd\u662f\u91cd\u590d\u6027\u5de5\u4f5c,<br \/>\n\u4e8e\u662f\u53c8\u6298\u817e\u4e86\u8fd9\u4e48\u4e2a\u73a9\u610f\u513f<\/p>\n<p>\u5176\u5b9e\u5df2\u7ecf\u6709\u73b0\u6210\u7684 <a href=\"https:\/\/github.com\/olafvdspek\/ctemplate\">Google CTemplate<\/a> \u4e86, \u539f\u7406\u4e0a\u90fd\u4e00\u6837,<br \/>\n\u5c31\u662f\u57fa\u672c\u7684\u6587\u672c\u66ff\u6362, \u6587\u672c\u5757\u6761\u4ef6\u5f00\u5173, \u7b49\u7b49<\/p>\n<p>\u987a\u4fbf\u5410\u69fd\u4e00\u4e0b XCode \u7684\u5de5\u7a0b\u6587\u4ef6, \u771f\u662f\u89c1\u8fc7\u7684\u6700\u7cdf\u7cd5\u7684\u5de5\u7a0b\u6587\u4ef6,<br \/>\n\u5143\u7d20\u5185\u5bb9\u662f\u901a\u8fc7\u4e00\u4e2a\u968f\u673a hash \u503c\u8fdb\u884c\u6807\u8bb0\u7684,<br \/>\n\u5bfc\u81f4\u6bcf\u6b21\u6dfb\u52a0\u65b0\u5143\u7d20\u65f6\u5de5\u7a0b\u6587\u4ef6\u90fd\u662f\u4e0d\u786e\u5b9a\u7684\u5185\u5bb9,<br \/>\n\u975e\u5e38\u4e0d\u5229\u4e8e\u7248\u672c\u63a7\u5236<\/p>\n<h2>XCode \u5de5\u7a0b\u6587\u4ef6\u6392\u5e8f<\/h2>\n<p>\u53c2\u8003 <a href=\"https:\/\/github.com\/truebit\/xUnique\">truebit\/xUnique<\/a><\/p>\n<p>\u7528\u4e8e\u5904\u7406 XCode \u7684\u5de5\u7a0b\u6587\u4ef6\u5e76\u6392\u5e8f, \u53ef\u4ee5\u6709\u6548\u907f\u514d\u90a3\u5c4e\u4e00\u6837\u7684\u51b2\u7a81, \u5177\u4f53\u81ea\u884c\u53c2\u89c1\u91cc\u9762\u7684\u6587\u6863<\/p>\n<ul>\n<li>\u867d\u8bf4\u6587\u6863\u91cc\u5efa\u8bae\u7528 git hook \u6216 XCode Build Scheme, \u4e0d\u8fc7\u6211\u8fd9\u8bd5\u8fc7\u662f\u53ef\u4ee5\u5728 Build Phase \u91cc\u9762\u6dfb\u52a0 Run Shell Script \u6765\u4f7f\u7528\u7684,<br \/>\n\u4e2a\u4eba\u5efa\u8bae\u5982\u679c\u8fd9\u4e48\u7528\u6ca1\u95ee\u9898\u7684\u8bdd\u8fd8\u662f\u52a0\u5728 Build Phase \u91cc\u9762\u66f4\u65b9\u4fbf\u4e00\u70b9<\/li>\n<li>\u5efa\u8bae\u4f7f\u7528\u8fd9\u4e2a <a href=\"https:\/\/github.com\/SolaWing\/xUnique\">fork<\/a>, \u539f repo \u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u6392\u5e8f\u548c XCode \u7684\u6392\u5e8f\u4e0d\u4e00\u81f4<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u64b8 ZFFramework \u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86, \u671f\u95f4\u79ef\u7d2f\u4e86\u4e0d\u5c11\u7ecf\u9a8c, \u59d1\u4e14\u7559\u4e2a\u6587\u505a\u4e2a\u8bb0\u5f55 \u8bbe\u8ba1\u76f8\u5173 \u8de8\u5e73\u53f0\u7684\u5b9e\u2026 <span class=\"read-more\"><a href=\"http:\/\/zsaber.com\/blog\/p\/113\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7,11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/zsaber.com\/blog\/p\/113\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u64b8 ZFFramework \u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86, \u671f\u95f4\u79ef\u7d2f\u4e86\u4e0d\u5c11\u7ecf\u9a8c, \u59d1\u4e14\u7559\u4e2a\u6587\u505a\u4e2a\u8bb0\u5f55 \u8bbe\u8ba1\u76f8\u5173 \u8de8\u5e73\u53f0\u7684\u5b9e\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/zsaber.com\/blog\/p\/113\" \/>\n<meta property=\"og:site_name\" content=\"\u67d0Z\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-01T06:35:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-26T07:45:23+00:00\" \/>\n<meta name=\"author\" content=\"Z\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Z\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113#article\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113\"},\"author\":{\"name\":\"Z\",\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"headline\":\"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6\",\"datePublished\":\"2016-06-01T06:35:02+00:00\",\"dateModified\":\"2019-08-26T07:45:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113\"},\"wordCount\":187,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"articleSection\":[\"C++\",\"ZFFramework\",\"\u957f\u671f\u66f4\u65b0\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/113#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113\",\"url\":\"http:\/\/zsaber.com\/blog\/p\/113\",\"name\":\"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#website\"},\"datePublished\":\"2016-06-01T06:35:02+00:00\",\"dateModified\":\"2019-08-26T07:45:23+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/zsaber.com\/blog\/p\/113\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/zsaber.com\/blog\/p\/113#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/zsaber.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/zsaber.com\/blog\/#website\",\"url\":\"http:\/\/zsaber.com\/blog\/\",\"name\":\"\u67d0Z\u7684\u535a\u5ba2\",\"description\":\"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403\",\"publisher\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/zsaber.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f\",\"name\":\"Z\",\"logo\":{\"@id\":\"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"\u67d0Z\",\"sameAs\":[\"http:\/\/ZFFramework.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/zsaber.com\/blog\/p\/113","og_locale":"zh_CN","og_type":"article","og_title":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2","og_description":"\u64b8 ZFFramework \u6709\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\u4e86, \u671f\u95f4\u79ef\u7d2f\u4e86\u4e0d\u5c11\u7ecf\u9a8c, \u59d1\u4e14\u7559\u4e2a\u6587\u505a\u4e2a\u8bb0\u5f55 \u8bbe\u8ba1\u76f8\u5173 \u8de8\u5e73\u53f0\u7684\u5b9e\u2026 Read More &raquo;","og_url":"http:\/\/zsaber.com\/blog\/p\/113","og_site_name":"\u67d0Z\u7684\u535a\u5ba2","article_published_time":"2016-06-01T06:35:02+00:00","article_modified_time":"2019-08-26T07:45:23+00:00","author":"Z","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"Z","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/zsaber.com\/blog\/p\/113#article","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/p\/113"},"author":{"name":"Z","@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"headline":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6","datePublished":"2016-06-01T06:35:02+00:00","dateModified":"2019-08-26T07:45:23+00:00","mainEntityOfPage":{"@id":"http:\/\/zsaber.com\/blog\/p\/113"},"wordCount":187,"commentCount":0,"publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"articleSection":["C++","ZFFramework","\u957f\u671f\u66f4\u65b0"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/zsaber.com\/blog\/p\/113#respond"]}]},{"@type":"WebPage","@id":"http:\/\/zsaber.com\/blog\/p\/113","url":"http:\/\/zsaber.com\/blog\/p\/113","name":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6 - \u67d0Z\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/zsaber.com\/blog\/#website"},"datePublished":"2016-06-01T06:35:02+00:00","dateModified":"2019-08-26T07:45:23+00:00","breadcrumb":{"@id":"http:\/\/zsaber.com\/blog\/p\/113#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/zsaber.com\/blog\/p\/113"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/zsaber.com\/blog\/p\/113#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/zsaber.com\/blog"},{"@type":"ListItem","position":2,"name":"ZFFramework \u4e2d\u7528\u5230\u7684\u4e00\u4e9b\u6280\u5de7\u6536\u96c6"}]},{"@type":"WebSite","@id":"http:\/\/zsaber.com\/blog\/#website","url":"http:\/\/zsaber.com\/blog\/","name":"\u67d0Z\u7684\u535a\u5ba2","description":"\u7b80\u4ecb\u53c8\u4e0d\u80fd\u5403","publisher":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/zsaber.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/6a6701fc719eff087e24e39a00e2280f","name":"Z","logo":{"@id":"http:\/\/zsaber.com\/blog\/#\/schema\/person\/image\/"},"description":"\u67d0Z","sameAs":["http:\/\/ZFFramework.com"]}]}},"_links":{"self":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/113"}],"collection":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":0,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zsaber.com\/blog\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}