Allows you to register for notifications about changes to File or Image objects and their subclasses.
FileListenerDecorator::register_listener($className, $staticMethodName, $eventType);
You can register a listener for any of these events, or use
all to listen to any event type.
Your class provides a static method which will receive the updated record AFTER writing. Example:
public static function on_file_notify($file, $event)
This will be called for each changed
File (or subclass) object, with
$event set to the relevant event type (
This static method may inspect the
changedFields and decide how to process the changes.
CAVEAT: Do not write() any File objects within your static method, results are not guaranteed to be pretty!