コード例 #1
0
 /**
  * Initialization function
  *
  * @return ApplicationContainerInterface
  */
 public static function init()
 {
     AutoLoader::setup();
     new LegacyLoader();
     return CBLib::createApplication('Web', null, function (ApplicationContainerInterface $app) {
         return CBConfig::getConfig($app->getDatabase());
     });
     // done in plugin.foundation.php for now:
     // Application::DI->get( 'LegacyFoundationFunctions' );
 }
コード例 #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     if (self::$autoloaded) {
         return;
     }
     self::$autoloaded = true;
     AutoLoader::registerMap('/^((?:cb|(?:mos)?comprofiler)[^\\\\]+|imgToolBox|PclZip|Archive_Tar|PEAR|TOOLBAR_usersextras)$/i', 'CB/Legacy/$1.php');
     // Fix for CB 1.9 plugins dblookupfield and autowelcome:
     AutoLoader::registerClass('CBUser', 'CB/Legacy/CBuser.php');
     // Fix for old CB modules:
     AutoLoader::registerClass('cbUser', 'CB/Legacy/CBuser.php');
     // We alias these classes for faster loading and also so that instanceof is true:
     class_alias('\\CB\\Database\\Table\\ComprofilerTable', 'moscomprofiler');
     class_alias('\\CB\\Database\\Table\\FieldTable', 'moscomprofilerFields');
     class_alias('\\CB\\Database\\Table\\FieldValueTable', 'moscomprofilerFieldValues');
     class_alias('\\CB\\Database\\Table\\ListTable', 'moscomprofilerLists');
     class_alias('\\CB\\Database\\Table\\MemberTable', 'moscomprofilerMember');
     class_alias('\\CB\\Database\\Table\\PluginTable', 'moscomprofilerPlugin');
     class_alias('\\CB\\Database\\Table\\TabTable', 'moscomprofilerTabs');
     class_alias('\\CB\\Database\\Table\\UserTable', 'moscomprofilerUser');
     class_alias('\\CB\\Database\\Table\\UserReportTable', 'moscomprofilerUserReport');
 }
コード例 #3
0
ファイル: CBLib.php プロジェクト: ankaau/GathBandhan
 /**
  * Initializes Auto-loader
  *
  * @return void
  */
 public static function init()
 {
     AutoLoader::setup();
 }
コード例 #4
0
/**
* Community Builder (TM)
* @version $Id: $
* @package CommunityBuilder
* @copyright (C) 2004-2016 www.joomlapolis.com / Lightning MultiCom SA - and its licensors, all rights reserved
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
*/
use CB\Application\CBApplication;
// below autoload CB\Legacy\LegacyFoundationFunctions;
use CBLib\Core\AutoLoader;
// ensure this file is being included by a parent file
if (!(defined('_VALID_CB') || defined('_JEXEC') || defined('_VALID_MOS'))) {
    die('Direct Access to this location is not allowed.');
}
// Check that CBLib with CB Lib is installed:
if (!is_readable(JPATH_SITE . '/libraries/CBLib/CB/Application/CBApplication.php')) {
    JFactory::getApplication()->enqueueMessage("Mandatory Community Builder lib_CBLib not installed!", 'error');
    return false;
}
// Loads the first file:
/** @noinspection PhpIncludeInspection */
include_once JPATH_SITE . '/libraries/CBLib/CB/Application/CBApplication.php';
// Initialize CB Application and Auto-load and initialize everything that was in here:
CBApplication::init()->getDI()->get('\\CB\\Legacy\\LegacyFoundationFunctions');
// Add the plugins library autoloading path:
AutoLoader::registerLibrary(JPATH_SITE . '/components/com_comprofiler/plugin/libraries/');
/**
 * The classes that were in here have moved to libraries/CBLib/CB/Legacy folder.
 * The functions in here have moved to libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php
 */