在自定义cms中创建可扩展模块

I'm creating a custom cms for fun and it is based around different modules that are used for specific tasks. Each module is its own class and I have a bootstrap file that loads the modules required for the current site so that if, for instance, the Picture Gallery module isn't required it won't be loaded.

If I want to modify one of the modules (let's say I need a small modification in the news management module) I could copy the entire class to a local folder and do the modifications there. The bootstrap process picks up the local files if they exist over the core ones. This works fine but it seems like a terrible way of doing things. If I have a couple of lines to change only I still have to copy the whole file.

What would be the best way to handle customizable modules beside using local copies for files? I'm thinking I could create a new module say CustomNews extends CoreNews but I'm not sure how this would all tie in together. How would I go about loading the custom classes?

I'm mostly looking for general information about the process. Thanks!