From 148f1fa6f072c9372abd2aaa7adf83cea84de2a5 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 17 Jul 2017 16:16:31 -0400 Subject: [PATCH] adding constructors to the registrationAccountSummary and registrationSummary classes accidentally left out the constructors for the classes --- .../registrationAccountSummary.php | 38 +++++++++++++++++++ .../registrations/registrationSummary.php | 25 ++++++++++++ 2 files changed, 63 insertions(+) diff --git a/models/front/registrations/registrationAccountSummary.php b/models/front/registrations/registrationAccountSummary.php index bfaef29..6b0e568 100644 --- a/models/front/registrations/registrationAccountSummary.php +++ b/models/front/registrations/registrationAccountSummary.php @@ -15,6 +15,44 @@ * @access public */ public $config; + /** + * Constructor + * + * This contructor performs the work for this model. This model returns + * an array containing the following. + * + * 'status' + * + * True if successfull and false if there was a fatal failure. + * + * 'view' + * + * A suggested view name that the contoller should use instead of the + * default view for this model or false to indicate that the default view + * should be used. + * + * 'data' + * + * Data that the model is returning for use in merging with the view to + * produce output. + * + * @wpdb object WordPress database object + * + * @return array Array containing status, suggested view, and any data + */ + public function __construct ($wpdb, $config) + { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + // Run constructor for members data class + parent::__construct(false, false); + + } public function modelAction($actionData = false) { diff --git a/models/front/registrations/registrationSummary.php b/models/front/registrations/registrationSummary.php index 5b9a0dd..3027348 100644 --- a/models/front/registrations/registrationSummary.php +++ b/models/front/registrations/registrationSummary.php @@ -16,6 +16,31 @@ * @access public */ public $config; + /** + * Constructor + * + * This contructor performs the work for this model. This model returns + * an array containing the following. + * + * 'status' + * + * True if successfull and false if there was a fatal failure. + * + * 'view' + * + * A suggested view name that the contoller should use instead of the + * default view for this model or false to indicate that the default view + * should be used. + * + * 'data' + * + * Data that the model is returning for use in merging with the view to + * produce output. + * + * @wpdb object WordPress database object + * + * @return array Array containing status, suggested view, and any data + */ public function modelAction($actionData = false) { -- 2.17.1