Skip to content

Instantly share code, notes, and snippets.

@dongilbert
Last active May 12, 2019 11:25
Show Gist options
  • Save dongilbert/4162595 to your computer and use it in GitHub Desktop.
Save dongilbert/4162595 to your computer and use it in GitHub Desktop.
Joomla Namespace Compatibility Layer
<?php
return array(
'JAccess' => 'Joomla\\Access\\Access',
'JAccessRule' => 'Joomla\\Access\\Rule',
'JAccessRules' => 'Joomla\\Access\\Rules',
'JApplicationBase' => 'Joomla\\Application\\Base',
'JApplicationCli' => 'Joomla\\Application\\Cli',
'JApplicationDaemon' => 'Joomla\\Application\\Daemon',
'JRoute' => 'Joomla\\Application\\Route',
'JRouter' => 'Joomla\\Application\\Router',
'JApplicationWeb' => 'Joomla\\Application\\Web',
'JApplicationWebClient' => 'Joomla\\Application\\Web\\Client',
'JApplicationWebRouter' => 'Joomla\\Application\\Web\\Router',
'JApplicationWebRouterBase' => 'Joomla\\Application\\Web\\Router\\Base',
'JApplicationWebRouterRest' => 'Joomla\\Application\\Web\\Router\\Rest',
'JArchive' => 'Joomla\\Archive\\Archive',
'JArchiveBzip2' => 'Joomla\\Archive\\Bzip2',
'JArchiveExtractable' => 'Joomla\\Archive\\Extractable',
'JArchiveGzip' => 'Joomla\\Archive\\Gzip',
'JArchiveTar' => 'Joomla\\Archive\\Tar',
'JArchiveZip' => 'Joomla\\Archive\\Zip',
'JAdapter' => 'Joomla\\Base\\Adapter',
'JAdapterInstance' => 'Joomla\\Base\\AdapterInstance',
'JCache' => 'Joomla\\Cache\\Cache',
'JCacheController' => 'Joomla\\Cache\\Controller',
'JCacheControllerCallback' => 'Joomla\\Cache\\Controller\\Callback',
'JCacheControllerOutput' => 'Joomla\\Cache\\Controller\\Output',
'JCacheControllerPage' => 'Joomla\\Cache\\Controller\\Page',
'JCacheControllerView' => 'Joomla\\Cache\\Controller\\View',
'JCacheStorage' => 'Joomla\\Cache\\Storage',
'JCacheStorageApc' => 'Joomla\\Cache\\Storage\\Apc',
'JCacheStorageCachelite' => 'Joomla\\Cache\\Storage\\Cachelite',
'JCacheStorageFile' => 'Joomla\\Cache\\Storage\\File',
'JCacheStorageHelper' => 'Joomla\\Cache\\Storage\\Helper',
'JCacheStorageMemcache' => 'Joomla\\Cache\\Storage\\Memcache',
'JCacheStorageMemcached' => 'Joomla\\Cache\\Storage\\Memcached',
'JCacheStorageWincache' => 'Joomla\\Cache\\Storage\\Wincache',
'JCacheStorageXcache' => 'Joomla\\Cache\\Storage\\Xcache',
'JClientFtp' => 'Joomla\\Client\\Ftp',
'JClientHelper' => 'Joomla\\Client\\Helper',
'JClientLdap' => 'Joomla\\Client\\Ldap',
'JControllerBase' => 'Joomla\\Controller\\Base',
'JController' => 'Joomla\\Controller\\Controller',
'JCryptCipher' => 'Joomla\\Crypt\\Cipher',
'JCryptCipher3DES' => 'Joomla\\Crypt\\Cipher_3des',
'JCryptCipherBlowfish' => 'Joomla\\Crypt\\Cipher_Blowfish',
'JCryptCipherMcrypt' => 'Joomla\\Crypt\\Cipher_Mcrypt',
'JCryptCipherRijndael256' => 'Joomla\\Crypt\\Cipher_Rijndael256',
'JCryptCipherSimple' => 'Joomla\\Crypt\\Cipher_Simple',
'JCrypt' => 'Joomla\\Crypt\\Crypt',
'JCryptKey' => 'Joomla\\Crypt\\Key',
'JCryptPassword' => 'Joomla\\Crypt\\Password',
'JCryptPasswordSimple' => 'Joomla\\Crypt\\Password\\Simple',
'JData' => 'Joomla\\Data\\Data',
'JDataDumpable' => 'Joomla\\Data\\Dumpable',
'JDataSet' => 'Joomla\\Data\\Set',
'JDatabase' => 'Joomla\\Database\\Database',
'JDatabaseInterface' => 'Joomla\\Database\\DatabaseInterface',
'JDatabaseDriver' => 'Joomla\\Database\\Driver',
'JDatabaseDriverMysql' => 'Joomla\\Database\\Driver\\Mysql',
'JDatabaseDriverMysqli' => 'Joomla\\Database\\Driver\\Mysqli',
'JDatabaseDriverOracle' => 'Joomla\\Database\\Driver\\Oracle',
'JDatabaseDriverPdo' => 'Joomla\\Database\\Driver\\Pdo',
'JDatabaseDriverPostgresql' => 'Joomla\\Database\\Driver\\Postgresql',
'JDatabaseDriverSqlazure' => 'Joomla\\Database\\Driver\\Sqlazure',
'JDatabaseDriverSqlite' => 'Joomla\\Database\\Driver\\Sqlite',
'JDatabaseDriverSqlsrv' => 'Joomla\\Database\\Driver\\Sqlsrv',
'JDatabaseExporter' => 'Joomla\\Database\\Exporter',
'JDatabaseExporterMysql' => 'Joomla\\Database\\Exporter\\Mysql',
'JDatabaseExporterMysqli' => 'Joomla\\Database\\Exporter\\Mysqli',
'JDatabaseExporterPostgresql' => 'Joomla\\Database\\Exporter\\Postgresql',
'JDatabaseFactory' => 'Joomla\\Database\\Factory',
'JDatabaseImporter' => 'Joomla\\Database\\Importer',
'JDatabaseImporterMysql' => 'Joomla\\Database\\Importer\\Mysql',
'JDatabaseImporterMysqli' => 'Joomla\\Database\\Importer\\Mysqli',
'JDatabaseImporterPostgresql' => 'Joomla\\Database\\Importer\\Postgresql',
'JDatabaseIterator' => 'Joomla\\Database\\DatabaseIterator',
'JDatabaseIteratorAzure' => 'Joomla\\Database\\Iterator\\Azure',
'JDatabaseIteratorMysql' => 'Joomla\\Database\\Iterator\\Mysql',
'JDatabaseIteratorMysqli' => 'Joomla\\Database\\Iterator\\Mysqli',
'JDatabaseIteratorOracle' => 'Joomla\\Database\\Iterator\\Oracle',
'JDatabaseIteratorPdo' => 'Joomla\\Database\\Iterator\\Pdo',
'JDatabaseIteratorSqlite' => 'Joomla\\Database\\Iterator\\Sqlite',
'JDatabaseIteratorSqlsrv' => 'Joomla\\Database\\Iterator\\Sqlsrv',
'JDatabaseQuery' => 'Joomla\\Database\\Query',
'JDatabaseQueryElement' => 'Joomla\\Database\\Query\\Element',
'JDatabaseQueryLimitable' => 'Joomla\\Database\\Query\\Limitable',
'JDatabaseQueryMysql' => 'Joomla\\Database\\Query\\Mysql',
'JDatabaseQueryMysqli' => 'Joomla\\Database\\Query\\Mysqli',
'JDatabaseQueryOracle' => 'Joomla\\Database\\Query\\Oracle',
'JDatabaseQueryPdo' => 'Joomla\\Database\\Query\\Pdo',
'JDatabaseQueryPostgresql' => 'Joomla\\Database\\Query\\Postgresql',
'JDatabaseQueryPreparable' => 'Joomla\\Database\\Query\\Preparable',
'JDatabaseQuerySqlAzure' => 'Joomla\\Database\\Query\\Sqlazure',
'JDatabaseQuerySqlite' => 'Joomla\\Database\\Query\\Sqlite',
'JDatabaseQuerySqlsrv' => 'Joomla\\Database\\Query\\Sqlsrv',
'JDate' => 'Joomla\\Date\\Date',
'JDocument' => 'Joomla\\Document\\Document',
'JDocumentError' => 'Joomla\\Document\\Error',
'JDocumentFeed' => 'Joomla\\Document\\Feed',
'JDocumentHtml' => 'Joomla\\Document\\Html',
'JDocumentImage' => 'Joomla\\Document\\Image',
'JDocumentJson' => 'Joomla\\Document\\Json',
'JDocumentOpensearch' => 'Joomla\\Document\\Opensearch',
'JDocumentRaw' => 'Joomla\\Document\\Raw',
'JDocumentXml' => 'Joomla\\Document\\Xml',
'JDocumentRender' => 'Joomla\\Document\\Renderer',
'JDocumentRendererAtom' => 'Joomla\\Document\\Renderer\\Atom',
'JDocumentRendererRss' => 'Joomla\\Document\\Renderer\\Rss',
'JDocumentRendererComponent' => 'Joomla\\Document\\Renderer\\Component',
'JDocumentRendererHead' => 'Joomla\\Document\\Renderer\\Head',
'JDocumentRendererMessage' => 'Joomla\\Document\\Renderer\\Message',
'JDocumentRendererModule' => 'Joomla\\Document\\Renderer\\Module',
'JDocumentRendererModules' => 'Joomla\\Document\\Renderer\\Modules',
'JBrowser' => 'Joomla\\Environment\\Browser',
'JResponse' => 'Joomla\\Environment\\Response',
'JEventDispatcher' => 'Joomla\\Event\\Dispatcher',
'JEvent' => 'Joomla\\Event\\Event',
'JFactory' => 'Joomla\\Factory',
'JFile' => 'Joomla\\Filesystem\\File',
'JFolder' => 'Joomla\\Filesystem\\Folder',
'JFilesystemHelper' => 'Joomla\\Filesystem\\Helper',
'JFilesystemPatcher' => 'Joomla\\Filesystem\\Patcher',
'JPath' => 'Joomla\\Filesystem\\Path',
'JStream' => 'Joomla\\Filesystem\\Stream',
'JStreamString' => 'Joomla\\Filesystem\\Stream\\String',
'JStringController' => 'Joomla\\Filesystem\\Support\\StringController',
'JFilterInput' => 'Joomla\\Filter\\Input',
'JFilterOutput' => 'Joomla\\Filter\\Output',
'JFormField' => 'Joomla\\Form\\Field',
'JFormFieldAccessLevel' => 'Joomla\\Form\\Field_AccessLevel',
'JFormFieldCacheHandler' => 'Joomla\\Form\\Field_CacheHandler',
'JFormFieldCalendar' => 'Joomla\\Form\\Field_Calendar',
'JFormFieldCheckbox' => 'Joomla\\Form\\Field_Checkbox',
'JFormFieldCheckboxes' => 'Joomla\\Form\\Field_Checkboxes',
'JFormFieldColor' => 'Joomla\\Form\\Field_Color',
'JFormFieldCombo' => 'Joomla\\Form\\Field_Combo',
'JFormFieldDatabaseConnection' => 'Joomla\\Form\\Field_DatabaseConnection',
'JFormFieldEMail' => 'Joomla\\Form\\Field_Email',
'JFormFieldFile' => 'Joomla\\Form\\Field_File',
'JFormFieldFileList' => 'Joomla\\Form\\Field_FileList',
'JFormFieldFolderList' => 'Joomla\\Form\\Field_FolderList',
'JFormFieldGroupedList' => 'Joomla\\Form\\Field_GroupedList',
'JFormFieldHidden' => 'Joomla\\Form\\Field_Hidden',
'JFormFieldImageList' => 'Joomla\\Form\\Field_ImageList',
'JFormFieldInteger' => 'Joomla\\Form\\Field_Integer',
'JFormFieldLanguage' => 'Joomla\\Form\\Field_Language',
'JFormFieldList' => 'Joomla\\Form\\Field_List',
'JFormFieldPassword' => 'Joomla\\Form\\Field_Password',
'JFormFieldPlugins' => 'Joomla\\Form\\Field_Plugins',
'JFormFieldRadio' => 'Joomla\\Form\\Field_Radio',
'JFormFieldRules' => 'Joomla\\Form\\Field_Rules',
'JFormFieldSessionHandler' => 'Joomla\\Form\\Field_SessionHandler',
'JFormFieldSpacer' => 'Joomla\\Form\\Field_Spacer',
'JFormFieldSQL' => 'Joomla\\Form\\Field_Sql',
'JFormFieldTel' => 'Joomla\\Form\\Field_Tel',
'JFormFieldText' => 'Joomla\\Form\\Field_Text',
'JFormFieldTextarea' => 'Joomla\\Form\\Field_Textarea',
'JFormFieldTimezone' => 'Joomla\\Form\\Field_Timezone',
'JFormFieldUrl' => 'Joomla\\Form\\Field_Url',
'JFormFieldUsergroup' => 'Joomla\\Form\\Field_Usergroup',
'JForm' => 'Joomla\\Form\\Form',
'JFormHelper' => 'Joomla\\Form\\Helper',
'JFormRule' => 'Joomla\\Form\\Rule',
'JFormRuleBoolean' => 'Joomla\\Form\\Rule\\Boolean',
'JFormRuleColor' => 'Joomla\\Form\\Rule\\Color',
'JFormRuleEmail' => 'Joomla\\Form\\Rule\\Email',
'JFormRuleEquals' => 'Joomla\\Form\\Rule\\Equals',
'JFormRuleOptions' => 'Joomla\\Form\\Rule\\Options',
'JFormRuleRules' => 'Joomla\\Form\\Rule\\Rules',
'JFormRuleTel' => 'Joomla\\Form\\Rule\\Tel',
'JFormRuleUrl' => 'Joomla\\Form\\Rule\\Url',
'JFormRuleUsername' => 'Joomla\\Form\\Rule\\Username',
'JGithubAccount' => 'Joomla\\Github\\Account',
'JGithubCommits' => 'Joomla\\Github\\Commits',
'JGithubForks' => 'Joomla\\Github\\Forks',
'JGithubGists' => 'Joomla\\Github\\Gists',
'JGithub' => 'Joomla\\Github\\Github',
'JGithubHooks' => 'Joomla\\Github\\Hooks',
'JGithubHttp' => 'Joomla\\Github\\Http',
'JGithubIssues' => 'Joomla\\Github\\Issues',
'JGithubMilestones' => 'Joomla\\Github\\Milestones',
'JGithubObject' => 'Joomla\\Github\\Object',
'JGithubPulls' => 'Joomla\\Github\\Pulls',
'JGithubRefs' => 'Joomla\\Github\\Refs',
'JGithubStatuses' => 'Joomla\\Github\\Statuses',
'JGoogleAuth' => 'Joomla\\Google\\Auth',
'JGoogleAuthOauth2' => 'Joomla\\Google\\Auth\\OAuth2',
'JGoogleData' => 'Joomla\\Google\\Data',
'JGoogleDataAdsense' => 'Joomla\\Google\\Data\\Adsense',
'JGoogleDataCalendar' => 'Joomla\\Google\\Data\\Calendar',
'JGoogleDataPicasa' => 'Joomla\\Google\\Data\\Picasa',
'JGoogleDataPicasaAlbum' => 'Joomla\\Google\\Data\\Picasa\\Album',
'JGoogleDataPicasaPhoto' => 'Joomla\\Google\\Data\\Picasa\\Photo',
'JGoogleDataPlus' => 'Joomla\\Google\\Data\\Plus',
'JGoogleDataPlusActivities' => 'Joomla\\Google\\Data\\Plus\\Activities',
'JGoogleDataPlusComments' => 'Joomla\\Google\\Data\\Plus\\Comments',
'JGoogleDataPlusPeople' => 'Joomla\\Google\\Data\\Plus\\People',
'JGoogleEmbed' => 'Joomla\\Google\\Embed',
'JGoogleEmbedAnalytics' => 'Joomla\\Google\\Embed\\Analytics',
'JGoogleEmbedMaps' => 'Joomla\\Google\\Embed\\Maps',
'JGoogle' => 'Joomla\\Google\\Google',
'JGrid' => 'Joomla\\Grid\\Grid',
'JHtmlAccess' => 'Joomla\\Html\\Access',
'JHtmlBehavior' => 'Joomla\\Html\\Behavior',
'JHtmlContent' => 'Joomla\\Html\\Content',
'JHtmlDate' => 'Joomla\\Html\\Date',
'JHtmlEmail' => 'Joomla\\Html\\Email',
'JHtmlForm' => 'Joomla\\Html\\Form',
'JHtmlGrid' => 'Joomla\\Html\\Grid',
'JHtml' => 'Joomla\\Html\\Html',
'JHtmlJGrid' => 'Joomla\\Html\\JGrid',
'JHtmlList' => 'Joomla\\Html\\Listt',
'JHtmlNumber' => 'Joomla\\Html\\Number',
'JHtmlRules' => 'Joomla\\Html\\Rules',
'JHtmlSelect' => 'Joomla\\Html\\Select',
'JHtmlSliders' => 'Joomla\\Html\\Sliders',
'JHtmlString' => 'Joomla\\Html\\String',
'JHtmlTabs' => 'Joomla\\Html\\Tabs',
'JHtmlTel' => 'Joomla\\Html\\Tel',
'JHtmlUser' => 'Joomla\\Html\\User',
'JHttpFactory' => 'Joomla\\Http\\Factory',
'JHttp' => 'Joomla\\Http\\Http',
'JHttpResponse' => 'Joomla\\Http\\Response',
'JHttpTransport' => 'Joomla\\Http\\Transport',
'JHttpTransportCurl' => 'Joomla\\Http\\Transport\\Curl',
'JHttpTransportSocket' => 'Joomla\\Http\\Transport\\Socket',
'JHttpTransportStream' => 'Joomla\\Http\\Transport\\Stream',
'JImage' => 'Joomla\\Image\\Image',
'JImageFilter' => 'Joomla\\Image\\Filter',
'JImageFilterBrightness' => 'Joomla\\Image\\Filter\\Brightness',
'JImageFilterContrast' => 'Joomla\\Image\\Filter\\Contrast',
'JImageFilterEdgedetect' => 'Joomla\\Image\\Filter\\Edgedetect',
'JImageFilterEmboss' => 'Joomla\\Image\\Filter\\Emboss',
'JImageFilterNegate' => 'Joomla\\Image\\Filter\\Grayscale',
'JImageFilterSketchy' => 'Joomla\\Image\\Filter\\Sketchy',
'JImageFilterSmooth' => 'Joomla\\Image\\Filter\\Smooth',
'JInputCli' => 'Joomla\\Input\\Cli',
'JInputCookie' => 'Joomla\\Input\\Cookie',
'JInputFiles' => 'Joomla\\Input\\Files',
'JInput' => 'Joomla\\Input\\Input',
'JInputJson' => 'Joomla\\Input\\Json',
'JKeychain' => 'Joomla\\Keychain\\Keychain',
'JLanguageHelper' => 'Joomla\\Language\\Helper',
'JLanguage' => 'Joomla\\Language\\Language',
'JLanguageStemmer' => 'Joomla\\Language\\Stemmer',
'JLanguageStemmerPorteren' => 'Joomla\\Language\\Stemmer\\Porteren',
'JText' => 'Joomla\\Language\\Text',
'JLanguageTransliterate' => 'Joomla\\Language\\Transliterate',
'JLogEntry' => 'Joomla\\Log\\Entry',
'JLog' => 'Joomla\\Log\\Log',
'JLogLogger' => 'Joomla\\Log\\Logger',
'JLogLoggerCallback' => 'Joomla\\Log\\Logger\\Callback',
'JLogLoggerDatabase' => 'Joomla\\Log\\Logger\\Database',
'JLogLoggerEcho' => 'Joomla\\Log\\Logger\\Echoo',
'JLogLoggerFormattedtext' => 'Joomla\\Log\\Logger\\Formattedtext',
'JLogLoggerMessagequeue' => 'Joomla\\Log\\Logger\\Messagequeue',
'JLogLoggerSyslog' => 'Joomla\\Log\\Logger\\Syslog',
'JLogLoggerW3c' => 'Joomla\\Log\\Logger\\W3c',
'JMailHelper' => 'Joomla\\Mail\\Helper',
'JMail' => 'Joomla\\Mail\\Mail',
'JModelBase' => 'Joomla\\Model\\Base',
'JModelDatabase' => 'Joomla\\Model\\Database',
'JModel' => 'Joomla\\Model\\Model',
'JOAuth2Client' => 'Joomla\\Oauth2\\Client',
'JObject' => 'Joomla\\Object\\Object',
'JPaginationObject' => 'Joomla\\Pagination\\Object',
'JPagination' => 'Joomla\\Pagination\\Pagination',
'JPluginHelper' => 'Joomla\\Plugin\\Helper',
'JPlugin' => 'Joomla\\Plugin\\Plugin',
'JProfiler' => 'Joomla\\Profiler\\Profiler',
'JRegistry' => 'Joomla\\Registry\\Registry',
'JRegistryFormat' => 'Joomla\\Registry\\Format',
'JRegistryFormatINI' => 'Joomla\\Registry\\Format\\Ini',
'JRegistryFormatJSON' => 'Joomla\\Registry\\Format\\Json',
'JRegistryFormatPHP' => 'Joomla\\Registry\\Format\\Php',
'JRegistryFormatXML' => 'Joomla\\Registry\\Format\\Xml',
'JSession' => 'Joomla\\Session\\Session',
'JSessionStorage' => 'Joomla\\Session\\Storage',
'JSessionStorageAPC' => 'Joomla\\Session\\Storage\\Apc',
'JSessionStorageDatabase' => 'Joomla\\Session\\Storage\\Database',
'JSessionStorageMemcache' => 'Joomla\\Session\\Storage\\Memcache',
'JSessionStorageMemcached' => 'Joomla\\Session\\Storage\\Memcached',
'JSessionStorageNone' => 'Joomla\\Session\\Storage\\None',
'JSessionStorageWincache' => 'Joomla\\Session\\Storage\\Wincache',
'JSessionStorageXcache' => 'Joomla\\Session\\Storage\\Xcache',
'JStringInflector' => 'Joomla\\String\\Inflector',
'JStringNormalise' => 'Joomla\\String\\Normalise',
'JString' => 'Joomla\\String\\String',
'JTableAsset' => 'Joomla\\Table\\Asset',
'JTableExtension' => 'Joomla\\Table\\Extension',
'JTableLanguage' => 'Joomla\\Table\\Language',
'JTableNested' => 'Joomla\\Table\\Nested',
'JTable' => 'Joomla\\Table\\Table',
'JTableUpdate' => 'Joomla\\Table\\Update',
'JTableUser' => 'Joomla\\Table\\User',
'JTableUsergroup' => 'Joomla\\Table\\Usergroup',
'JTableViewlevel' => 'Joomla\\Table\\Viewlevel',
'JUri' => 'Joomla\\Uri\\Uri',
'JURI' => 'Joomla\\Uri\\Uri',
'JAuthentication' => 'Joomla\\User\\Authentication',
'JAuthenticationResponse' => 'Joomla\\User\\AuthenticationResponse',
'JUserHelper' => 'Joomla\\User\\Helper',
'JUser' => 'Joomla\\User\\User',
'JArrayHelper' => 'Joomla\\Utilities\\ArrayHelper',
'JBuffer' => 'Joomla\\Utilities\\Buffer',
'JUtility' => 'Joomla\\Utilities\\Utility',
'JViewBase' => 'Joomla\\View\\Base',
'JViewHtml' => 'Joomla\\View\\Html',
'JView' => 'Joomla\\View\\View'
);
Copy link

ghost commented Nov 28, 2012

For the above, 3 nits.

  1. Add the global namespace to the old classes, ie \JDatabaseQuery - it's just provides more clarity.
  2. class_alias will attempt to autoload the class being assigned an alias[the new class]. This means that running this method will load each and every one of those files, mostly for no reason. As such, add a parameter specify whether or not to autoload the new class and default it to false.
  3. If for some reason someone has defined their own versions of the old classes, this code will blow up when trying to assign a second alias. As such call class_exists on the old classes before mapping them - and again add an autoload control parameter for whether or not the old class should be autoloaded if possible.
    public static function setup($autoloadNew = false, $autoloadOld = false)
    {
    foreach(self::$classmap as $new => $old)
    {
    if !(class_exists($old, $autoloadOld) {
    class_alias($new, $old, $autoloadNew);
    }
    }
}

@dongilbert
Copy link
Author

Gary,

Thanks for taking the time to comment. I've looked into what you've mentioned and came up with these solutions.

  1. That would be fairly simple to implement. I'm not opposed, but since this is being ran within the global name space, that classes are being aliased to the global namespace already.

  2. I opted to just set the third param of class_alias to false. The classes shouldn't be autoloaded unless they are being used.

  3. I agree - we should call class_exists before class alias, and this should probably run through the autoloader by default. In case someone has included code to override the default class either via registerPrefix for another place to look for 'J' prefixed files, or via the JLoader::discover() method. So I defaulted it to true, with a setting.

@dongilbert
Copy link
Author

In regards to #1, class_alias always put's the new class in the global namespace - http://www.php.net/manual/en/function.class-alias.php#105403

In regards to #2, if you try to alias a non-existant class, then a PHP Warning is produced. So we must autoload all the classes that we alias in order for this to work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment