Version: v0.7.1 - Beta.  We welcome contributors & feedback.

ObjectHooks.onDestroy

onDestroy() -> none

Description

This method is called when there are no longer any references to a the object, or when the script is shutting down.

Usually this is not necessary, as PHP cleans up most state and data after every request.

class MyObject {

    public fn onDestroy {
        ...
    }
}

See Also