}
}
include_once(JPATH_ROOT.'/administrator/components/com_hikashop/pluginCompat.php');
#[AllowDynamicProperties]
class hikashopPlugin extends hikashopJoomlaPlugin {
var $db;
var $type = 'plugin';
var $multiple = false;
var $plugin_params = null;
var $toolbar = array();
{
$segments = array();
$params = array('option','Itemid','start','format','limitstart','lang','cart_id', 'tmpl');
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(function_exists('hikashop_config') || include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) {
\Joomla\CMS\Plugin\PluginHelper::importPlugin('hikashop');
$app = \Joomla\CMS\Factory::getApplication();
$app->triggerEvent('onBeforeHikashopBuildRoute', array(&$query, $separator, &$params));
$config = hikashop_config();
$jversion = preg_replace('#[^0-9\.]#i','',JVERSION);
if(version_compare($jversion,'4.0.0','>=')) {
class hikashopRouter extends Joomla\CMS\Component\Router\RouterBase {
public function build(&$query) {
return _HikashopBuildRoute($query);
}
public function parse(&$segments) {
return _HikashopParseRoute($segments);
}
$item = empty($query['Itemid']) ? null : $this->menu->getItem($query['Itemid']); // Build the component route $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']); $crouter = $this->getComponentRouter($component); $parts = $crouter->build($query); $tmp = trim(implode('/', $parts)); // Build the application route if ($item !== null && $query['option'] === $item->component) { if (!$item->home) { if (!\array_key_exists('build' . $stage, $this->rules)) { throw new \InvalidArgumentException(\sprintf('The %s stage is not registered. (%s)', $stage, __METHOD__)); } foreach ($this->rules['build' . $stage] as $rule) { \call_user_func_array($rule, [&$this, &$uri]); } } /** * Create a uri based on a full or partial URL string // Do the preprocess stage of the URL build process $this->processBuildRules($uri, self::PROCESS_BEFORE); // Do the main stage of the URL build process $this->processBuildRules($uri); // Do the postprocess stage of the URL build process $this->processBuildRules($uri, self::PROCESS_AFTER); $this->cache[$key] = clone $uri; if (!isset(self::$_router[$client])) { throw new \RuntimeException(Text::sprintf('JLIB_APPLICATION_ERROR_ROUTER_LOAD', $client), 500); } // Build route. $uri = self::$_router[$client]->build($url); $scheme = ['path', 'query', 'fragment']; /* * Get the secure/unsecure URLs. * } $app = Factory::getApplication(); $client = $app->getName(); return static::link($client, $url, $xhtml, $tls, $absolute); } catch (\RuntimeException) { /** * @deprecated 3.9 this method will not fail silently from 6.0 * Before 3.9.0 this method failed silently on router error. This B/C will be removed in Joomla 6.0 */ preg_match_all('#href="' . $prefix . 'index.php\?([^"]+)"#m', $buffer, $matches); foreach ($matches[1] as $urlQueryString) { $buffer = str_replace( 'href="' . $prefix . 'index.php?' . $urlQueryString . '"', 'href="' . $prefix . Route::_('index.php?' . $urlQueryString) . '"', $buffer ); } $this->checkBuffer($buffer); return; } // Only run this specifically for Error pages, as normal pages are handled in onAfterRender if ($app->getDocument() instanceof ErrorDocument) { $this->rewriteUrls($app); } } /** * Core logic to rewrite relative URLs in the body buffer foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } $dispatcher = $this->getDispatcher(); } catch (\UnexpectedValueException $exception) { return null; } return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this)); } /** * Method to run the application routines. * ExceptionHandler::handleException($event->getError()); } // Trigger the onBeforeRespond event. $this->dispatchEvent( 'onBeforeRespond', new BeforeRespondEvent('onBeforeRespond', ['subject' => $this]) ); // Send the application response.// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "hikashopJoomlaPlugin" from the global namespace.
Did you forget a "use" statement?
at /home/britelight/public_html/administrator/components/com_hikashop/helpers/helper.php:3831
at include_once()
(/home/britelight/public_html/components/com_hikashop/router.php:34)
at _HikashopBuildRoute(array('option' => 'com_hikashop', 'view' => 'user', 'layout' => 'cpanel', 'Itemid' => '104'))
(/home/britelight/public_html/components/com_hikashop/router.php:17)
at hikashopRouter->build(array('option' => 'com_hikashop', 'view' => 'user', 'layout' => 'cpanel', 'Itemid' => '104'))
(/home/britelight/public_html/libraries/src/Router/SiteRouter.php:450)
at Joomla\CMS\Router\SiteRouter->buildSefRoute(object(SiteRouter), object(Uri))
(/home/britelight/public_html/libraries/src/Router/Router.php:446)
at Joomla\CMS\Router\Router->processBuildRules(object(Uri))
(/home/britelight/public_html/libraries/src/Router/Router.php:205)
at Joomla\CMS\Router\Router->build('index.php?option=com_hikashop&view=user&layout=cpanel&Itemid=104')
(/home/britelight/public_html/libraries/src/Router/Route.php:150)
at Joomla\CMS\Router\Route::link('site', 'index.php?option=com_hikashop&view=user&layout=cpanel&Itemid=104', true, 0, false)
(/home/britelight/public_html/libraries/src/Router/Route.php:99)
at Joomla\CMS\Router\Route::_('index.php?option=com_hikashop&view=user&layout=cpanel&Itemid=104')
(/home/britelight/public_html/plugins/system/sef/src/Extension/Sef.php:291)
at Joomla\Plugin\System\Sef\Extension\Sef->rewriteUrls(object(SiteApplication))
(/home/britelight/public_html/plugins/system/sef/src/Extension/Sef.php:255)
at Joomla\Plugin\System\Sef\Extension\Sef->onBeforeRespond(object(BeforeRespondEvent))
(/home/britelight/public_html/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('onBeforeRespond', object(BeforeRespondEvent))
(/home/britelight/public_html/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
at Joomla\Application\AbstractApplication->dispatchEvent('onBeforeRespond', object(BeforeRespondEvent))
(/home/britelight/public_html/libraries/src/Application/CMSApplication.php:338)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/britelight/public_html/includes/app.php:58)
at require_once('/home/britelight/public_html/includes/app.php')
(/home/britelight/public_html/index.php:51)
|