Description
This is the core file for APPNET OS Evil Extend.
Evil Extend is one of the most powerful features in APPNET OS.
With Evil Extend every class, regardless of whether it is a core class or an app class, can be extended without having to touch the class itself.
This means that every method of a class can be overwritten or new methods can be added.
It doesn't matter which namespace the class has.
The classes can be overloaded multiple times, whereby the overloads are carried out backwards, recursively.
The loading sequence of the extensions can be changed in the APPNET OS administration area and are then stored in this file.
The APPNET OS system gives apps an easy way to extend classes.
The extensions are automatically added to this file when the app is installed.
If an app is deactivated, the extension is also automatically deactivated.
When you uninstall an app, the extension will be removed.
How to extend a class through an app with APPNET OS Evil Extend can be found in the developer tutorial.
What should you watch out for with APPNET OS Evil Extend?
The /custom/extends.php file manages the extensions and the overload order.
If an app is installed at runtime or the loading sequence is adjusted via the administrative area, this file is changed.
If you have an automatic deployment process, you must make sure that this file is not overwritten.
In such cases, it is best to remove the file from the process and integrate it as a symlink.
If you transport your file to your server via FTP, then make sure that the file is not overwritten, otherwise your extensions and the loading sequence will be lost.
If you are working with a local development system, you can also change the overload sequence there and replace the file in your live system.
What if the file and its overloads are lost?
If the file is lost, the overloads are no longer carried out.
For this special case you have to deactivate and reactivate the apps with extend classes in the APPNET OS administration area.
The file is checked and recreated if necessary.
Do not forget to adjust the order of extensions again and to save the file.