本文整理汇总了PHP中Citruscart::getUriRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP Citruscart::getUriRoot方法的具体用法?PHP Citruscart::getUriRoot怎么用?PHP Citruscart::getUriRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Citruscart
的用法示例。
在下文中一共展示了Citruscart::getUriRoot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (Citruscart::load('CitruscartController' . $controller . $protocol, "controllers." . $controller . "_" . $protocol, $options)) {
$controller .= $protocol;
}
} else {
if (!Citruscart::load('CitruscartController' . $controller, "controllers.{$controller}", $options)) {
$controller = '';
}
}
if (empty($controller)) {
// redirect to default
$redirect = "index.php?option=com_citruscart&view=products";
$redirect = JRoute::_($redirect, false);
JFactory::getApplication()->redirect($redirect);
}
$js = "var com_citruscart = {};\n";
$js .= "com_citruscart.jbase = '" . Citruscart::getUriRoot() . "';\n";
$doc->addScriptDeclaration($js);
JHtml::_('script', 'media/citruscart/js/common.js', false, false);
require_once JPATH_SITE . '/libraries/dioscouri/loader.php';
$parentPath = JPATH_ADMINISTRATOR . '/components/com_citruscart/helpers';
DSCLoader::discover('CitruscartHelper', $parentPath, true);
$parentPath = JPATH_ADMINISTRATOR . '/components/com_citruscart/library';
DSCLoader::discover('Citruscart', $parentPath, true);
$parentPath = JPATH_ADMINISTRATOR . '/components/com_citruscart/tables';
DSCLoader::discover('CitruscartTable', $parentPath, true);
// load the plugins
JPluginHelper::importPlugin('citruscart');
// Check Json Class Existance
if (!function_exists('json_decode')) {
// This should load not only the class, but also json_encode / json_decode
Citruscart::load('Services_JSON', 'library.json');