Overwriting a Class function when module active


I’m trying to make a Module who will be able to modify actions images in function of their type code.
For this, I need a way to overwrite the ‘getNomUrl’ function in htdocs\comm\action\class\actioncomm.class.php.
Is it possible to do that ?

Thanks for the Help !

I have the same issue.
I want to overwrite the function getNomUrl() in societe.class.php.