VbzCart/v1/class/vcCartForm

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
/*----
  PURPOSE: adds some app-specific data to the blob-form class
  NOTE: ShipZone needs to go here rather than in the formgroup objects because
    wierd things happen with it not getting set in some cases. Insufficient
    time to figure out what was going on.
  HISTORY:
    2019-03-01 Created to hopefully resolve ShipZone sometimes being NULL in formgroups.
    2019-03-05 Changed from being a blob-descendant to a form-descendant
*/
class vcCartForm extends fcForm_blob {

    public function __construct(string $sName) {
        $oBlob = new fcBlobField();
        parent::__construct($sName,$oBlob);
    }
    
    private $oZone;
    // PUBLIC for vcCartDataManager
    public function SetShipZone(vcShipCountry $oZone) {
	$this->oZone = $oZone;
    }
    // API
    public function GetShipZone() : vcShipCountry {
	return $this->oZone;
    }
}