/**
  * Get the data we'd like to cache.
  *
  * This is a bit magical. It iterates through all of the table columns,
  * and checks if a getter for that method exists. If so, it pulls in that
  * value. Otherwise, it will pull in the default value. If you'd like to
  * customize this you should override this function in your child model
  * class.
  *
  * @since 1.0
  *
  * @return array
  */
 public function get_data_to_cache()
 {
     $data = parent::get_data_to_cache();
     unset($data['key']);
     $data['lkey'] = $this->get_key();
     $data['transaction_id'] = $this->get_transaction() ? $this->get_transaction()->ID : null;
     return $data;
 }
 /**
  * Get the data we'd like to cache.
  *
  * This is a bit magical. It iterates through all of the table columns,
  * and checks if a getter for that method exists. If so, it pulls in that
  * value. Otherwise, it will pull in the default value. If you'd like to
  * customize this you should override this function in your child model
  * class.
  *
  * @since 1.0
  *
  * @return array
  */
 public function get_data_to_cache()
 {
     $data = parent::get_data_to_cache();
     unset($data['key']);
     $data['lkey'] = $this->get_key()->get_key();
     $data['release_id'] = $this->get_release() ? $this->get_release()->get_pk() : null;
     return $data;
 }
Example #3
0
 /**
  * Get the data we'd like to cache.
  *
  * This is a bit magical. It iterates through all of the table columns,
  * and checks if a getter for that method exists. If so, it pulls in that
  * value. Otherwise, it will pull in the default value. If you'd like to
  * customize this you should override this function in your child model
  * class.
  *
  * @since 1.0
  *
  * @return array
  */
 public function get_data_to_cache()
 {
     $data = parent::get_data_to_cache();
     $data['lkey'] = $this->get_key();
     $data['transaction_id'] = $this->get_transaction()->ID;
     // account for guest checkouts
     if (!is_int($data['customer'])) {
         $data['customer'] = 0;
     }
     return $data;
 }