How to replace system class

Is it possible to replace one of the system classes with my own without I have to change the real file - what I mean is: I want to copy system class file to application specific directory, modify it there and load it instead of the real one. How can I do that?

Which system class you want to modify? You can replace nearly every system class. The actual method depends on which kind of classes you are trying to replace.

…it is the CContentDecorator…

You may extend it and use it like a widget. I don't see problem here.

Quote

You may extend it and use it like a widget. I don't see problem here.

Well, I want to use "beginContent" and "endContent" methods (and I am using them currently), but I want to add extra functionality to the CContentDescriptor (without changing the views)…

Override these two methods then. You can put them in a base controller class.

:D Ofcourse, thanks!

I have no idea why I got the wrong direction and thought that I should change the widgt's class…