* load extend
()
| 61 | * load extend |
| 62 | */ |
| 63 | loadExtend() { |
| 64 | const exts = think.loader.loadExtend(); |
| 65 | const list = [ |
| 66 | ['think', think], |
| 67 | ['application', think.app], |
| 68 | ['context', think.app.context], |
| 69 | ['request', think.app.request], |
| 70 | ['response', think.app.response], |
| 71 | ['controller', think.Controller.prototype], |
| 72 | ['logic', think.Logic.prototype], |
| 73 | ['service', think.Service.prototype] |
| 74 | ]; |
| 75 | list.forEach(item => { |
| 76 | if (!exts[item[0]]) return; |
| 77 | Loader.extend(item[1], exts[item[0]]); |
| 78 | }); |
| 79 | } |
| 80 | /** |
| 81 | * load crontab |
| 82 | */ |