Hello everyone! I built a fairly complex CMS based on Phalcon, and i'm quite aware of the docs. After searching a lot, I couldn't find a way to override the "setRelated" method from outside of a model.
What i need is to apply an algorithm to get custom values out of a model (for example a custom query on the db, but could be also not related to databases), but not in the same context. I mean, I can easily do this inside the model by overriding the "setRelated" method, but how can i do this from outside?
I built the core to be extendable by modules, so I often use ModelManager with methods like "addHasOne", "addBelongsTo", "addHasMany" and "addHasManyToMany" to add relations to models from another module - but it seems i can't associate a method to be executed with the specified alias.