Application.cfc
admin サブディレクトリで、親ディレクトリのサブディレクトリを拡張します。例:
component extends="ApplicationProxy" {
// eg: if you need to do something different in the local onApplicationStart:
public void function onApplicactionStart(){
super.onApplicationStart();
// stuff that's different from the parent goes here
}
// if there's nothing different for a given handler, then don't have one in here: the super one will still fire
// otherwise override each handler in a similar fashion to the onApplicationStart above, with:
// a) a call to its super equivalent
// b) anything that needs overriding
}
ベースディレクトリにApplicationProxy.cfc
、次のように追加します。
component extends="Application" {
}
これは、循環参照のように見えるため、サブルーチンにを含めるApplication.cfc
ことができないためです。extends="Application"
ただし、ベース ディレクトリ内の Application.cfc を識別するより適切な「資格のある」方法はないため、プロキシが必要です。