dbconn, $installer->dbconn->charSet); $sql = $schemaXMLParser->parseSchema($this->getInstallSchemaFile()); if ($sql) { $result = $installer->executeSQL($sql); } else { $installer->setError(INSTALLER_ERROR_DB, str_replace('{$file}', $this->getInstallSchemaFile(), Locale::translate('installer.installParseDBFileError'))); $result = false; } return false; } /** * Get the filename of the install data for this plugin. * Subclasses using SQL tables should override this. */ function getInstallDataFile() { return null; } function installData(&$plugin, $args) { $installer =& $args[0]; $result =& $args[1]; $sql = $installer->dataXMLParser->parseData($this->getInstallDataFile()); if ($sql) { $result = $installer->executeSQL($sql); } else { $installer->setError(INSTALLER_ERROR_DB, str_replace('{$file}', $this->getInstallDataFile(), Locale::translate('installer.installParseDBFileError'))); $result = false; } return false; } function displayPaymentForm($queuedPaymentId, $key, &$queuedPayment) { die('ABSTRACT METHOD'); } function isConfigured() { return false; // Abstract; should be implemented in subclasses } /** * This is a hook wrapper that is responsible for calling * displayPaymentSettingsForm. Subclasses should override * displayPaymentSettingsForm as necessary. */ function _smartyDisplayPaymentSettingsForm($hookName, $args) { $params =& $args[0]; $smarty =& $args[1]; $output =& $args[2]; if (isset($params['plugin']) && $params['plugin'] == $this->getName()) { $output .= $this->displayPaymentSettingsForm($params, $smarty); } return false; } function displayPaymentSettingsForm(&$params, &$smarty) { return $smarty->fetch($this->getTemplatePath() . 'settingsForm.tpl'); } function getSettingsFormFieldNames() { return array(); // Subclasses should override } /** * Handle an incoming request from a user callback or an external * payment processing system. */ function handle($args) { // Subclass should override. Request::redirect(null, null, 'index'); } } ?>