- Added new general HubHelper interface and let it extend/implement by suitable classes/interfaces
- Used the new interface as type-hint in enqueueRawDataFromTemplate()
Signed-off-by: Roland Haeder <roland@mxchange.org>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-interface ConnectionHelper extends Helper {
+interface ConnectionHelper extends HubHelper {
/**
* Sends raw package data to the recipient
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-interface HelpableDht extends Helper {
+interface HelpableDht extends HubHelper {
/**
* Loads the descriptor XML file
*
--- /dev/null
+<?php
+/**
+ * An general interface for hub helper classes
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HubHelper extends Helper {
+}
+
+// [EOF]
+?>
<?php
/**
- * An interface for hub helper classes
+ * An interface for node helper classes
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-interface HelpableNode extends Helper {
+interface HelpableNode extends HubHelper {
/**
* Loads the descriptor XML file
*
* from given helper's template instance and pushing it on the 'undeclared'
* stack.
*
- * @param $helperInstance An instance of a Helper class
+ * @param $helperInstance An instance of a HubHelper class
* @return void
*/
- function enqueueRawDataFromTemplate (Helper $helperInstance);
+ function enqueueRawDataFromTemplate (HubHelper $helperInstance);
/**
* Checks whether a package has been enqueued for delivery.
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackage::NETWORK_TARGET_!!!);
+ $this->setRecipientType(NetworkPackage::NETWORK_TARGET_```);
// Set package tags
$this->setPackageTags(array('???'));
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseHubSystemHelper extends BaseHubSystem implements Helper {
+class BaseHubSystemHelper extends BaseHubSystem implements HubHelper {
/**
* Recipient type
*/
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable, ProtocolHandler {
+class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable {
// Exception codes
const EXCEPTION_UNSUPPORTED_ERROR_HANDLER = 0x9100;
* from given helper's template instance and pushing it on the 'undeclared'
* stack.
*
- * @param $helperInstance An instance of a Helper class
+ * @param $helperInstance An instance of a HubHelper class
* @return void
*/
- public function enqueueRawDataFromTemplate (Helper $helperInstance) {
+ public function enqueueRawDataFromTemplate (HubHelper $helperInstance) {
// Get protocol instance for recipient
$protocolInstance = ProtocolHandlerFactory::createProtocolFromRecipientHelper($helperInstance);