_vendorObj || $options) { $options['tradeshowId'] = $this->getPrimaryKey(); $this->_vendorObj = new VendorObj($options); } return $this->_vendorObj; } public function getAttendeeObj(array $options = []) { if (null === $this->_attendeeObj || $options) { $options['tradeshowId'] = $this->getPrimaryKey(); $this->_attendeeObj = new AttendeeObj($options); } return $this->_attendeeObj; } public static function preparePricingData(&$tradeShow) { $space = $representative = $electricity = 0; /** if NOW >= ebDeadline (Early Bird Deadline), add ebdIncreaseAmount to each prices**/ if ($tradeShow['ebDeadline'] && date("Y-m-d H:i:s") >= date("Y-m-d H:i:s", strtotime($tradeShow['ebDeadline'])) ) { $space = (float) $tradeShow['ebdIncreaseBoothSpacePrice']; $representative = (float) $tradeShow['ebdIncreaseBoothRepresentativePrice']; $electricity = (float) $tradeShow['ebdIncreaseElectricityPrice']; } /** attendees boothRepresentativePrice price **/ $tradeShow['boothRepresentativePrice'] = bcadd((float) $tradeShow['boothRepresentativePrice'], $representative, 2); /** boothSpace price **/ $tradeShow['boothSpacePrice'] = bcadd((float) $tradeShow['boothSpacePrice'], $space, 2); /** electricityHookUp price **/ if ($tradeShow['electricityPrice']) { $tradeShow['electricityPrice'] = bcadd((float) $tradeShow['electricityPrice'], $electricity, 2); } } }