/**
  * Constructor.
  *
  * @param  EE_Registration[]     $data expecting an array of EE_Registration objects.
  * @throws EE_Error
  * @access protected
  */
 public function __construct($data = array())
 {
     //validate that the first element in the array is an EE_Registration object.
     if (!reset($data) instanceof EE_Registration) {
         throw new EE_Error(__('The EE_Message_Registrations_incoming_data class expects an array of EE_Registration objects.', 'event_espresso'));
     }
     parent::__construct($data);
 }
 /**
  * Constructor.
  *
  * @since    4.3.0
  * @param  EE_Attendee[]     $data expecting an array of EE_Attendee objects.
  * @access protected
  */
 public function __construct($data = array())
 {
     //validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
     $ctc_chk = reset($data);
     if (!$ctc_chk instanceof EE_Attendee) {
         throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
     }
     parent::__construct($data);
 }
 /**
  * incoming data is expected to be a EE_Transaction object and (possibly) EE_Payment object in an array.  
  * @param array $data
  */
 public function __construct($data)
 {
     //test for valid params
     if (!$data[0] instanceof EE_Transaction) {
         throw new EE_Error(__('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso'));
     }
     if (!$data[1] instanceof EE_Payment) {
         $pmt_obj = $this->_get_empty_payment_obj($data[0]);
     }
     $data = array('txn_obj' => $data[0], 'pmt_obj' => isset($pmt_obj) ? $pmt_obj : $data[1]);
     parent::__construct($data);
 }
 /**
  * For the constructor of this special preview class.
  *
  * The data is expected to be an array that came from the $_POST and $_GET and should have at least one property from the list looked for.
  *
  * @param EE_Registration|array $data
  * @throws \EE_Error
  */
 public function __construct($data)
 {
     $filtered_reg_status = null;
     if (!is_array($data) && $data instanceof EE_Registration) {
         $this->reg_obj = $data;
     } else {
         $this->reg_obj = is_array($data) && isset($data[0]) && $data[0] instanceof EE_Registration ? $data[0] : null;
         $filtered_reg_status = is_array($data) && !empty($data[1]) ? $data[1] : null;
     }
     if (!$this->reg_obj instanceof EE_Registration) {
         throw new EE_Error(sprintf(__('%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'), 'EE_Messages_REG_incoming_data', 'EE_Registration'));
     }
     $data = array('reg_obj' => $this->reg_obj, 'filtered_reg_status' => $filtered_reg_status);
     parent::__construct($data);
 }
 public function __construct(EE_Session $data)
 {
     parent::__construct($data);
 }
 /**
  * For the constructor of this special preview class.  We're either looking for an event id or empty data.  If we have an event id (or ids) then we'll use that as the source for the "dummy" data.  If the data is empty then we'll get the first three published events from the users database and use that as a source.
  * @param array $data
  */
 public function __construct($data = array())
 {
     $data = empty($data) ? array() : $data['event_ids'];
     $this->_setup_attendees_events();
     parent::__construct($data);
 }
 /**
  * For the constructor of this special preview class.  We're either looking for an event id or empty data.  If we have an event id (or ids) then we'll use that as the source for the "dummy" data.  If the data is empty then we'll get the first three published events from the users database and use that as a source.
  * @param array $data
  */
 public function __construct($data = array())
 {
     $this->_data = isset($data['event_ids']) ? $data['event_ids'] : array();
     $this->_setup_attendees_events();
     parent::__construct($data);
 }
 /**
  * For the constructor of this special preview class. 
  *
  * The data is expected to be an array that came from the $_POST and $_GET and should have at least one property from the list looked for.
  * 
  * @param EE_Registration $data
  */
 public function __construct(EE_Registration $data)
 {
     $this->reg_obj = $data;
     parent::__construct($data);
 }