PHP class that provides transaction functionality for custom collections