{"id":15345,"date":"2024-11-17T20:30:55","date_gmt":"2024-11-17T12:30:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=15345"},"modified":"2024-11-17T20:30:55","modified_gmt":"2024-11-17T12:30:55","slug":"yaf%e5%8f%af%e9%80%89%e7%9a%84%e9%85%8d%e7%bd%ae%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/15345\/","title":{"rendered":"Yaf\u53ef\u9009\u7684\u914d\u7f6e\u9879"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">Yaf\u548c\u7528\u6237\u5171\u7528\u4e00\u4e2a\u914d\u7f6e\u7a7a\u95f4, \u4e5f\u5c31\u662f\u5728Yaf_Application\u521d\u59cb\u5316\u65f6\u523b\u7ed9\u51fa\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u914d\u7f6e. \u4f5c\u4e3a\u533a\u522b, Yaf\u7684\u914d\u7f6e\u9879\u90fd\u4ee5ap\u5f00\u5934. Yaf\u7684\u6838\u5fc3\u5fc5\u4e0d\u53ef\u5c11\u7684\u914d\u7f6e\u9879\u53ea\u6709\u4e00\u4e2a(\u5176\u5b9e, \u8fd9\u4e2a\u4e5f\u53ef\u4ee5\u6709\u9ed8\u8ba4\u53c2\u6570, \u4f46\u662f\u4f5c\u8005\u89c9\u5f97\u5b8c\u5168\u6ca1\u6709\u914d\u7f6e, \u663e\u5f97\u592a\u5bd2\u9178\u4e86).<\/span><\/p>\n<pre class=\"p1\">Yaf\u901a\u8fc7\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d, \u9009\u53d6\u4e0d\u540c\u7684\u914d\u7f6e\u8282, \u518d\u7ed3\u5408\u914d\u7f6e\u53ef\u7ee7\u627f, \u6765\u5b9e\u73b0\u4e00\u5957\u914d\u7f6e\u9002\u5e94\u591a\u79cd\u73af\u5883\r\n(\u7ebf\u4e0a,\u6d4b\u8bd5,\u5f00\u53d1).<\/pre>\n<p>&nbsp;<\/p>\n<table border=\"1\" cellspacing=\"5\" cellpadding=\"5\">\n<tbody>\n<tr>\n<th width=\"10\">\u540d\u79f0<\/th>\n<th width=\"10\">\u503c\u7c7b\u578b<\/th>\n<th width=\"10\">\u9ed8\u8ba4\u503c<\/th>\n<th width=\"10\">\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td>application.directory<\/td>\n<td>String<\/td>\n<td><\/td>\n<td>\u5e94\u7528\u7684\u7edd\u5bf9\u76ee\u5f55\u8def\u5f84<\/td>\n<\/tr>\n<tr>\n<td>application.ext<\/td>\n<td>String<\/td>\n<td>php<\/td>\n<td>PHP\u811a\u672c\u7684\u6269\u5c55\u540d<\/td>\n<\/tr>\n<tr>\n<td>application.bootstrap<\/td>\n<td>String<\/td>\n<td>Bootstrapplication.php<\/td>\n<td>Bootstrap\u8def\u5f84(\u7edd\u5bf9\u8def\u5f84)<\/td>\n<\/tr>\n<tr>\n<td>application.library<\/td>\n<td>String<\/td>\n<td>application.directory + \u201c\/library\u201d<\/td>\n<td>\u672c\u5730(\u81ea\u8eab)\u7c7b\u5e93\u7684\u7edd\u5bf9\u76ee\u5f55\u5730\u5740<\/td>\n<\/tr>\n<tr>\n<td>application.baseUri<\/td>\n<td>String<\/td>\n<td><\/td>\n<td>\u5728\u8def\u7531\u4e2d, \u9700\u8981\u5ffd\u7565\u7684\u8def\u5f84\u524d\u7f00, \u4e00\u822c\u4e0d\u9700\u8981\u8bbe\u7f6e, Yaf\u4f1a\u81ea\u52a8\u5224\u65ad.<\/td>\n<\/tr>\n<tr>\n<td>application.dispatcher.defaultModule<\/td>\n<td>String<\/td>\n<td>index<\/td>\n<td>\u9ed8\u8ba4\u7684\u6a21\u5757<\/td>\n<\/tr>\n<tr>\n<td>application.dispatcher.throwException<\/td>\n<td>Bool<\/td>\n<td>True<\/td>\n<td>\u5728\u51fa\u9519\u7684\u65f6\u5019, \u662f\u5426\u629b\u51fa\u5f02\u5e38<\/td>\n<\/tr>\n<tr>\n<td>application.dispatcher.catchException<\/td>\n<td>Bool<\/td>\n<td>False<\/td>\n<td>\u662f\u5426\u4f7f\u7528\u9ed8\u8ba4\u7684\u5f02\u5e38\u6355\u83b7Controller, \u5982\u679c\u5f00\u542f, \u5728\u6709\u672a\u6355\u83b7\u7684\u5f02\u5e38\u7684\u65f6\u5019, \u63a7\u5236\u6743\u4f1a\u4ea4\u7ed9ErrorController\u7684errorAction\u65b9\u6cd5, \u53ef\u4ee5\u901a\u8fc7$request-&gt;getException()\u83b7\u5f97\u6b64\u5f02\u5e38\u5bf9\u8c61<\/td>\n<\/tr>\n<tr>\n<td>application.dispatcher.defaultController<\/td>\n<td>String<\/td>\n<td>index<\/td>\n<td>\u9ed8\u8ba4\u7684\u63a7\u5236\u5668<\/td>\n<\/tr>\n<tr>\n<td>application.dispatcher.defaultAction<\/td>\n<td>String<\/td>\n<td>index<\/td>\n<td>\u9ed8\u8ba4\u7684\u52a8\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>application.view.ext<\/td>\n<td>String<\/td>\n<td>phtml<\/td>\n<td>\u89c6\u56fe\u6a21\u677f\u6269\u5c55\u540d<\/td>\n<\/tr>\n<tr>\n<td>application.modules<\/td>\n<td>String<\/td>\n<td>Index<\/td>\n<td>\u58f0\u660e\u5b58\u5728\u7684\u6a21\u5757\u540d, \u8bf7\u6ce8\u610f, \u5982\u679c\u4f60\u8981\u5b9a\u4e49\u8fd9\u4e2a\u503c, \u4e00\u5b9a\u8981\u5b9a\u4e49Index Module<\/td>\n<\/tr>\n<tr>\n<td>application.system.*<\/td>\n<td>String<\/td>\n<td>*<\/td>\n<td>\u901a\u8fc7\u8fd9\u4e2a\u5c5e\u6027, \u53ef\u4ee5\u4fee\u6539yaf\u7684runtime configure, \u6bd4\u5982application.system.lowcase_path, \u4f46\u662f\u8bf7\u6ce8\u610f\u53ea\u6709PHP_INI_ALL\u7684\u914d\u7f6e\u9879\u624d\u53ef\u4ee5\u5728\u8fd9\u91cc\u88ab\u4fee\u6539, \u6b64\u9009\u9879\u4ece2.2.0\u5f00\u59cb\u5f15\u5165<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yaf\u548c\u7528\u6237\u5171\u7528\u4e00\u4e2a\u914d\u7f6e\u7a7a\u95f4, \u4e5f\u5c31\u662f\u5728Yaf_Application\u521d\u59cb\u5316\u65f6\u523b\u7ed9\u51fa\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u914d\u7f6e. \u4f5c\u4e3a\u533a\u522b, Yaf\u7684\u914d\u7f6e\u9879\u90fd\u4ee5ap\u5f00\u5934. Yaf\u7684\u6838\u5fc3\u5fc5\u4e0d\u53ef\u5c11\u7684\u914d\u7f6e\u9879\u53ea\u6709\u4e00\u4e2a(\u5176\u5b9e, \u8fd9\u4e2a\u4e5f\u53ef\u4ee5\u6709\u9ed8\u8ba4\u53c2\u6570, \u4f46\u662f\u4f5c\u8005\u89c9\u5f97\u5b8c\u5168\u6ca1\u6709\u914d\u7f6e, \u663e\u5f97\u592a\u5bd2\u9178\u4e86). Yaf\u901a\u8fc7\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d, \u9009\u53d6\u4e0d\u540c\u7684\u914d\u7f6e\u8282, \u518d\u7ed3\u5408\u914d\u7f6e\u53ef\u7ee7\u627f, \u6765\u5b9e\u73b0\u4e00\u5957\u914d\u7f6e\u9002\u5e94\u591a\u79cd\u73af\u5883 (\u7ebf\u4e0a,\u6d4b\u8bd5,\u5f00\u53d1). &nbsp; \u540d\u79f0 \u503c\u7c7b\u578b \u9ed8\u8ba4\u503c \u8bf4\u660e application.directory String \u5e94\u7528\u7684\u7edd\u5bf9\u76ee\u5f55\u8def\u5f84 application.ext String php PHP\u811a\u672c\u7684\u6269\u5c55\u540d application.bootstrap String Bootstrapplication.php Bootstrap\u8def\u5f84(\u7edd\u5bf9\u8def\u5f84) application.library String application.directory + \u201c\/library\u201d \u672c\u5730(\u81ea\u8eab)\u7c7b\u5e93\u7684\u7edd\u5bf9\u76ee\u5f55\u5730\u5740 application.baseUri String \u5728\u8def\u7531\u4e2d, \u9700\u8981\u5ffd\u7565\u7684\u8def\u5f84\u524d\u7f00, \u4e00\u822c\u4e0d\u9700\u8981\u8bbe\u7f6e, Yaf\u4f1a\u81ea\u52a8\u5224\u65ad. application.dispatcher.defaultModule String index \u9ed8\u8ba4\u7684\u6a21\u5757 application.dispatcher.throwException Bool True \u5728\u51fa\u9519\u7684\u65f6\u5019, \u662f\u5426\u629b\u51fa\u5f02\u5e38 application.dispatcher.catchException Bool False \u662f\u5426\u4f7f\u7528\u9ed8\u8ba4\u7684\u5f02\u5e38\u6355\u83b7Controller, \u5982\u679c\u5f00\u542f, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-15345","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=15345"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15345\/revisions"}],"predecessor-version":[{"id":15346,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15345\/revisions\/15346"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=15345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=15345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=15345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}