From: Anthony Talarico Date: Mon, 17 Jul 2017 20:16:31 +0000 (-0400) Subject: adding constructors to the registrationAccountSummary and registrationSummary classes X-Git-Tag: v1.0.0^2~475 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=148f1fa6f072c9372abd2aaa7adf83cea84de2a5;p=WP-Plugins%2Fglm-member-db-registrations.git adding constructors to the registrationAccountSummary and registrationSummary classes accidentally left out the constructors for the classes --- 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) {