Hi,
I don’t think I like the idea of having users create a class file to extend the core. This in itself could pose a problem for users if in the future we decided to add a method that their customized class is using:
example:
1) User A extends ContentManager to add a getFuctionA()
2) We then later and a getFunctionA() to the ContentManager class.
3) User B ships a Widget that relies on getFunctionA from ContentManager
4) User A downloads and installs the widget but it fails to work due to the fact that they have over ContentManager getFunctionA
IMO I think the idea of extending the core using $cms->extension is much better and allows the user to load multiple extensions and any given time.
The getExtension() function is used to return a reference to the object:
$e = $cms->getExtension('Event'); // get reference
$e->invoke('OnCustomEvent');
// this is the same as the above
$cms->event->invoke('OnCustomEvent');