I want to override the Member->update() functionality and seeing as this is not possible through data Extensions and their are no hooks in the update function i was wondering what the correct way of doing this is?
I tried it through the injector pattern but this did not really help me much seeing as now the Member table is not even created anymore when i use a structure along the form of:
config.yml
Injector:
Member:
class: CustomMember
CustomerMember:
class CustomMember extends Member
{
public function update($data) {
return parent::update($data);
}
}
And while i probably could do this through the Object:useCustomClass() i was wondering if this was possible through the Injector in anyway to only overwrite one single method.
Edit
I just tried it on the Member class but this is pointless in the current situation even with Object:useCustomClass() seeing as DataObject:get() does not look through this list. And simply grabs the class you use instead of any class that might overwrite this.
So i am now really looking for a way to overwrite build in functionality like update or delete for for example Member.