function remove_gsmg_urls() { $ULIB = new urlLibrary(); $ULIB->loadConfig(); $ULIB->removeCommand('gsmg', ''); $ULIB->saveConfig(); $UHANDLER = new urlHandler(); $UHANDLER->loadConfig(); $UHANDLER->removePluginHandlers('gsmg', ''); $UHANDLER->saveConfig(); }
public function register($type, $url, $representation, $handler) { $core =& $GLOBALS['core']; $t = new ArrayObject(array($type, $url, $representation, $handler)); $core->callBehavior("publicRegisterURL", $t); parent::register($t[0], $t[1], $t[2], $t[3]); }
function remove_urls() { global $tpl, $mysql, $twig; $ULIB = new urlLibrary(); $ULIB->loadConfig(); $ULIB->removeCommand('eshop', ''); $ULIB->removeCommand('eshop', 'show'); $ULIB->removeCommand('eshop', 'search'); $ULIB->removeCommand('eshop', 'stocks'); $ULIB->removeCommand('eshop', 'compare'); $ULIB->removeCommand('eshop', 'currency'); $ULIB->removeCommand('eshop', 'yml_export'); $ULIB->removeCommand('eshop', 'ebasket_list'); $ULIB->removeCommand('eshop', 'order'); $ULIB->removeCommand('eshop', 'payment'); $ULIB->saveConfig(); $UHANDLER = new urlHandler(); $UHANDLER->loadConfig(); $UHANDLER->removePluginHandlers('eshop', ''); $UHANDLER->removePluginHandlers('eshop', 'show'); $UHANDLER->removePluginHandlers('eshop', 'search'); $UHANDLER->removePluginHandlers('eshop', 'stocks'); $UHANDLER->removePluginHandlers('eshop', 'compare'); $UHANDLER->removePluginHandlers('eshop', 'currency'); $UHANDLER->removePluginHandlers('eshop', 'yml_export'); $UHANDLER->removePluginHandlers('eshop', 'ebasket_list'); $UHANDLER->removePluginHandlers('eshop', 'order'); $UHANDLER->removePluginHandlers('eshop', 'payment'); $UHANDLER->saveConfig(); }
<?php //import all the necessary classes and set up the error handler function exception_error_handler($errno, $errstr, $errfile, $errline) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { //set up variables include 'config.php'; include 'classes/template_variables.php'; include 'classes/class_xml.php'; $xmlstuff = new xmlStuff(array('path' => $xmlpath)); include 'classes/class_error.php'; $errorhandler = new errorHandler(array('templatepath' => $templatepath)); include 'classes/class_url.php'; $urlhandler = new urlHandler(array('urlsfile' => $urlsfile, 'templatepath' => $templatepath)); $command = $urlhandler->getURL(); include 'classes/class_snapd.php'; //extends class xml $cd = new cdHandler(array('command' => $command, 'path' => $templatepath, 'xmlpath' => $xmlpath, 'showall' => $showall, 'itemsperpage' => $itemsperpage)); include 'classes/class_templating.php'; $templateHandler = new templateHandler(array('path' => $templatepath, 'relatedfunctions' => $cd, 'matchtemplates' => $matchtemplates)); $templateHandler->openFile($command); } catch (Exception $e) { $errorhandler->error($e); }