Example #1
0
 * @copyright  Copyright (C) 2011-2013 Shaun Maunder. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die;
// Load the global platform language file
JFactory::getLanguage()->load('shmanic_platform', JPATH_ROOT);
// Platform directory location
if (!defined('SHPATH_PLATFORM')) {
    define('SHPATH_PLATFORM', JPATH_PLATFORM . '/shmanic');
}
if (!class_exists('SHLoader')) {
    // Include the autoloader
    require_once SHPATH_PLATFORM . '/loader.php';
}
// Register the autoloader for all shmanic libraries
SHLoader::setup();
if (!class_exists('SHFactory')) {
    // Manually include the factory
    require_once SHPATH_PLATFORM . '/factory.php';
}
// Register the JForm field classes
if (file_exists(SHPATH_PLATFORM . '/form/fields')) {
    JForm::addFieldPath(SHPATH_PLATFORM . '/form/fields');
}
// Register the JForm rule classes
if (file_exists(SHPATH_PLATFORM . '/form/rules')) {
    JForm::addRulePath(SHPATH_PLATFORM . '/form/rules');
}
// Define deprecated class names file paths for the autoloader
SHLoader::register('SHUserAdaptersLdap', SHPATH_PLATFORM . '/user/adapter/ldap.php');
SHLoader::register('SHLdapEventBouncer', SHPATH_PLATFORM . '/adapter/event/bouncer.php');