Is `$this->old_object` used for anything but replacing the current object? If not, it might make sense to check:
```
if ($this->shouldReplaceObject()) {
   $this->old_object = clone $this->getObject();
}
```

You could also make the `getOldObject()` method check if `$this->shouldReplaceObject()` and throw an exception if it returns `false`. If you're going to do that, I'd also make `$this->old_object` private so that the `getOldObject()` has to be used to access it by sub-classes.