Suppose, there is an event observer class in core. I can override it. But, is it safe? I mean, does it affect other functions of the observer class?
Like, if there are two functions in core observer class and I did override only one function. Then, will the other function work safely as before.
I think it is similar to model override and should be safe. Am I right?
Edit:-
For example,
Most probably it will but if you override something that others might be using it's always worth to make something similar:
public function samefunction($object){
if(mymodueleisused){
//do your different thing
} else {
return parent::samefunction();
}
}
and as others have told you : "if you are in need to change/override the core then you are probably doing it wrong" and it's better to ask in different manner by describing what you want to do and why