1
idk if this is best practice, but there was a time when I dreamed of splitting some XOOPS functionalities into mini libraries that could be reused with more permissive licenses. One of such cases was this library –
Criteria.
If I remember right, this helper was originally spun off sometime around the XOOPS 2.4 era. It was already standalone in v1.0, and the idea was to preserve the XOOPS-style query-building logic in a form that could be used outside the CMS.
Now, with
v2.0, it’s been updated to run smoothly on modern PHP (8.3). This isn’t a full rewrite - just a cleanup and upgrade, using some newer language features and best practices. The public API is still the same, so if you’ve used the original, it should feel familiar.
A lot has changed in the XOOPS world since then (and honestly, still not sure why the current version isn’t called 3.0 or 4.0 - it’s clearly evolved a lot), but maybe this little library could be still useful.
Criteria v2.0 on GitHubMIT licensed, Composer-ready, and designed to work even in non-XOOPS projects that want something XOOPS-like.
P.S.: long time not posting here; I hope everyone here is still fine ;)