Core OXID eShop classes: must not be extended

Not all classes of the OXID eShop are part of the public interface (public API).

Some classes offer core OXID framework functionality, which ensures that OXID eShop (including extensions that have been written according to our guidelines) work as expected. Extending these core classes in modules or in individual shop customizations therefore engenders the risk of breaking core functionality.

As these classes are not part of the public OXID API, they may be changed in patches and are not part of the deprecation procedure.

Please ensure that none of your modules or customizations extend any of these classes.

In code, these core classes are marked as follows:

*Class handling some feature
*@internal Do not make a module extension for this class.
class oxClass
// some code

However, if you want to find out all classes that mustn’t be extended, please use the following command in source/ directory:

$ grep -lir '@internal'

If you want to overwrite these classes anyway, you might want to read these hints:

Some classes can be overloaded by setting up this information in directly:

$this->aModules = 
array(‘oxutilsobject’ => ‘my_oxutilsobject’ 

or this, if Modules should be defined in admin or metadata.php as usual:

include getShopBasePath().'core/oxconfk.php';
$this->_loadVarsFromDb( $this->getShopId(), array('aModules') );

There is also a GPL autoloader available from WBL Konzept, which can be used to extend classes that mustn’t be extended:

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *