コード例 #1
0
ファイル: loader.php プロジェクト: cuongnd/etravelservice
//-- @todo: check for installed g11n PEAR package to remove the "shut-up"
//-- @require_once 'elkuku/g11n/language.php';
if (!class_exists('g11n')) {
    //-- 2) Check the libraries folder
    if (!jimport('g11n.language')) {
        //-- 3) Load a dummy language handler -> english only !
        ecrLoadHelper('g11n_dummy');
        ecrScript('g11n_dummy', 'php2js');
    }
}
if (class_exists('g11n')) {
    //-- TEMP@@debug
    if (ECR_DEV_MODE && ECR_DEBUG_LANG) {
        //-- @@DEBUG
        g11n::cleanStorage();
        g11n::setDebug(ECR_DEBUG_LANG);
    }
    //-- Get our special language file
    g11n::loadLanguage();
}
/*
 * Functions
 */
/**
 * Autoloader.
 *
 * @param $className
 *
 * @return mixed
 */
function easy_creator_loader($className)
コード例 #2
0
// Global functions
require_once JPATH_COMPONENT_ADMINISTRATOR . '/includes/loader.php';
// Global constants
require_once JPATH_COMPONENT_ADMINISTRATOR . '/includes/defines.php';
$debug = false;
if (!class_exists('g11n')) {
    jimport('g11n.language');
    if (!class_exists('g11n')) {
        ecrLoadHelper('g11n_dummy');
    }
}
try {
    if (class_exists('g11n')) {
        // TEMP@@debug
        // @   g11n::cleanStorage();//@@DEBUG
        g11n::setDebug($debug);
        // Get our special language file
        g11n::loadLanguage();
    }
} catch (Exception $e) {
    JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
}
$document = JFactory::getDocument();
// Add css
$document->addStyleSheet('media/com_easycreator/site/css/default.css');
// Add javascript
$document->addScript('media/com_easycreator/site/js/easycreator.js');
// Include standard html
JLoader::import('helpers.html', JPATH_COMPONENT);
// Require the base controller
require_once JPATH_COMPONENT . DS . 'controller.php';