The $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'] global array acts as a registry of XCLASSed classes.
Examples
In ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'] = array(
'className' => 'Vendor\\Myext\\Xclass\\ContentObjectRenderer'
);
Below is the way if the class is not autoloaded or not namespaced,
In ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_main_class'] = array('className' => 'ux_tx_extending_class');
In ext_autoload.php
<?php
$extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('myextextend');
return array(
'ux_tx_extending_class' => $extensionPath . 'class.ux_tx_extending_class.php',
);
?>