Magic function or Autoloading Classes

There are a loader for a missing function? or a loader for a missing component? like the “Autoloading Classes” in another language?

In cfml for a component there is onMissingMethod onMissingMethod Code Examples and CFML Documentation

Lucee 6 adds a new onMissingKey listener for struct [LDEV-3579] - Lucee

otherwise cfml doesn’t, do you have some examples of what you’re referring to in other languages?

1 Like

In PHP have a function, “spl_autoload_register”, in java exist the “java.lang.ClassLoader”.

Do you want to load a component (cfc), a single compiled Java class, or an OSGI Java library?

I want load cfc component, when it was not loaded previously.