Using Custom Loader Classes
Last updated Oct 17th, 2026 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moreYou can provide any of the following static methods in your custom xPDOObject derivative classes to override their behavior, including in driver-specific classes:
- _loadRows
- _loadInstance
- _loadCollectionInstance
- load
- loadCollection
- loadCollectionGraph
This is done with the help of the xPDO::call() method.
Overriding these methods allows you to implement additional behavior or completely change the behavior of loading your table objects via the object and collection methods provided by xPDO and xPDOObject. For instance, it can be used to perform security checks or to add i18n processing before allowing a row to be loaded.
In xPDO 3.x, the xPDO::call() method is used to invoke these static methods on the appropriate class. You can override the behavior by defining these methods in your model classes.
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










