<?php
/**
- * An interface for chatter
+ * An interface for chatter classes
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
+ * @todo We need to find a better name for this interface
*
* 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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
interface Chatter extends FrameworkInterface {
+ /**
+ * Method to "bootstrap" the chatter. This step does also apply provided
+ * command-line arguments stored in the request instance. You should now
+ * get it from calling $this->getRequestInstance().
+ *
+ * @return void
+ */
+ function doBootstrapping ();
+
+ /**
+ * Outputs the console teaser. This should only be executed on startup or
+ * full restarts. This method generates some space around the teaser.
+ *
+ * @return void
+ */
+ function outputConsoleTeaser ();
+
+ /**
+ * Add some chatter-specific filters
+ *
+ * @param $controllerInstance An object of a Controller instance
+ * @param $responseInstance An object of a Responseable instance
+ * @return void
+ */
+ function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance);
+
+ /**
+ * Enables/disables the chatter (just sets a flag)
+ *
+ * @param $version Version number of this chatter
+ * @return void
+ */
+ function enableIsActive ($isActive = true);
+
+ /**
+ * Determines wether the chatter is active
+ *
+ * @return $isActive Wether the chatter is active
+ */
+ function isActive ();
}
// [EOF]
*/
interface CruncherHelper extends FrameworkInterface {
/**
- * Method to "bootstrap" the node. This step does also apply provided
+ * Method to "bootstrap" the cruncher. This step does also apply provided
* command-line arguments stored in the request instance. You should now
* get it from calling $this->getRequestInstance().
*
// Return the prepared instance
return $chatInstance;
}
+
+ /**
+ * Method to "bootstrap" the chatter. This step does also apply provided
+ * command-line arguments stored in the request instance. You should now
+ * get it from calling $this->getRequestInstance().
+ *
+ * @return void
+ */
+ public function doBootstrapping () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Outputs the console teaser. This should only be executed on startup or
+ * full restarts. This method generates some space around the teaser.
+ *
+ * @return void
+ */
+ public function outputConsoleTeaser () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Add some chatter-specific filters
+ *
+ * @param $controllerInstance An object of a Controller instance
+ * @param $responseInstance An object of a Responseable instance
+ * @return void
+ */
+ public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) {
+ $this->partialStub('Please implement this method.');
+ }
}
// [EOF]
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseNodeChat extends BaseHubSystem {
+ /**
+ * Wether this Chatter is active
+ */
+ private $isActive = false;
+
/**
* Protected constructor
*
// Call parent constructor
parent::__construct($className);
}
+
+ /**
+ * Enables/disables the chatter (just sets a flag)
+ *
+ * @param $version Version number of this chatter
+ * @return void
+ */
+ public final function enableIsActive ($isActive = true) {
+ $this->isActive = (bool) $isActive;
+ }
+
+ /**
+ * Determines wether the chatter is active
+ *
+ * @return $isActive Wether the chatter is active
+ */
+ public final function isActive () {
+ return $this->isActive;
+ }
}
// [EOF]
<?php
/**
- * A node Console chat
+ * A node console chat
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
// Return the prepared instance
return $chatInstance;
}
+
+ /**
+ * Method to "bootstrap" the chatter. This step does also apply provided
+ * command-line arguments stored in the request instance. You should now
+ * get it from calling $this->getRequestInstance().
+ *
+ * @return void
+ */
+ public function doBootstrapping () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Outputs the console teaser. This should only be executed on startup or
+ * full restarts. This method generates some space around the teaser.
+ *
+ * @return void
+ */
+ public function outputConsoleTeaser () {
+ $this->partialStub('Please implement this method.');
+ }
+
+ /**
+ * Add some chatter-specific filters
+ *
+ * @param $controllerInstance An object of a Controller instance
+ * @param $responseInstance An object of a Responseable instance
+ * @return void
+ */
+ public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) {
+ $this->partialStub('Please implement this method.');
+ }
}
// [EOF]
* 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 TestUnitSource extends BaseSource implements Sourceable {
+class TestUnitSource extends BaseSource implements Sourceable, Registerable {
/**
* Protected constructor
*