Ejemplo n.º 1
0
 /**
  * Returns an array map from the product's values.
  *
  * @return array The map data for the product.
  */
 public function getMap()
 {
     $map = parent::getMap();
     ArrayUtils::addIfNotNull($map, 'price', $this->getPrice());
     ArrayUtils::addIfNotNull($map, 'title', $this->getTitle());
     ArrayUtils::addIfNotNull($map, 'currency', $this->getCurrency());
     ArrayUtils::addIfNotNull($map, 'categoryId', $this->getCategoryId());
     ArrayUtils::addIfNotNull($map, 'type', $this->getType());
     ArrayUtils::addIfNotNull($map, 'customAmount', $this->getCustomAmount());
     ArrayUtils::addIfNotNull($map, 'subscriptionRenewal', $this->getSubscriptionRenewal());
     ArrayUtils::addIfNotNull($map, 'failedPayment', $this->getFailedPayment());
     return $map;
 }
Ejemplo n.º 2
0
 /**
  * Returns an array map from the product's values.
  *
  * @return array The map data for the product.
  */
 public function getMap()
 {
     $map = array();
     ArrayUtils::addIfNotNull($map, 'id', $this->getId());
     return $map;
 }