(Yaf >=1.0.0)
Yaf_Dispatcher用于初始化處理請(qǐng)求的運(yùn)行環(huán)境, 它協(xié)調(diào)路由來(lái)的請(qǐng)求, 并分發(fā)和執(zhí)行發(fā)現(xiàn)的動(dòng)作, 然后收集動(dòng)作產(chǎn)生的響應(yīng), 輸出響應(yīng)給請(qǐng)求者, 并在整個(gè)過(guò)程完成以后返回響應(yīng).
Yaf_Dispatcher是單例模式運(yùn)行的, 也就是說(shuō)自始至終只生成一個(gè)Yaf_Dispatcher實(shí)例, 因此, 可以把它看成是在分發(fā)過(guò)程中生成的對(duì)象的注冊(cè)表, 可以從中獲取到分發(fā)過(guò)程中產(chǎn)生的對(duì)象.