$helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
$helper->addInputTextField('amount', 1000);
+// Add payments
+$helper->getValueInstance()->addResultsToHelper($helper);
+
// Ask again for current account password
$helper->addFormGroup('pass_old', "Bitte gebe zur Bestätigung der Nachbestellung dein derzeitiges Passwort ein.");
$helper->addFieldText('pass_old', "Derzeitiges Passwort:");
* @return void
*/
function discover (Requestable $requestInstance);
+
+ /**
+ * Adds the database result in a human-readable format to the helper class
+ *
+ * @param $helperInstance An instance of a helper class
+ * @return void
+ */
+ function addResultsToHelper (HelpableTemplate $helperInstance);
}
//
*
* @param $requestInstance An instance of a Requestable class
* @return void
+ * @todo 0% done
*/
public function discover (Requestable $requestInstance) {
$this->partialStub("Please implement this method.");
}
+
+ /**
+ * Adds the database result in a human-readable format to the helper class
+ *
+ * @param $helperInstance An instance of a helper class
+ * @return void
+ * @todo 0% done
+ */
+ public function addResultsToHelper (HelpableTemplate $helperInstance) {
+ $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 LocalPaymentDiscovery extends BaseDiscovery implements Discoverable {
+class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable, Registerable {
/**
* Protected constructor
*
// Set the result instance
$this->setResultInstance($resultInstance);
}
+
+ /**
+ * Adds the database result in a human-readable format to the helper class
+ *
+ * @param $helperInstance An instance of a helper class
+ * @return void
+ * @todo 0% done
+ */
+ public function addResultsToHelper (HelpableTemplate $helperInstance) {
+ // Undone part
+ }
}
// [EOF]
*/
private $actionName = "";
- /**
- * Instance of a discovery class
- */
- private $discoveryInstance = null;
-
/**
* Protected constructor
*
return $this->actionName;
}
- /**
- * Protected setter for discovery instance
- *
- * @param $discoveryInstance A discovery instance
- * @return void
- */
- protected final function setDiscoveryInstance (Discoverable $discoveryInstance) {
- $this->discoveryInstance = $discoveryInstance;
- }
-
- /**
- * Protected getter for discovery instance
- *
- * @return $discoveryInstance A discovery instance
- */
- public final function getDiscoveryInstance () {
- return $this->discoveryInstance;
- }
-
/**
* Executes the filter with given request and response objects
*
$discoveryInstance->discover($requestInstance);
// Remember this instance if all wents fine
- $this->setDiscoveryInstance($discoveryInstance);
+ Registry::getRegistry()->addInstance('payments', $discoveryInstance);
} catch (FrameworkException $e) {
// Something bad happend
$requestInstance->requestIsValid(false);