PHP library for handling tree structures based on parent IDs, e.g. a self-joined database table