private function buildPriceOption(TPPriceOption $po, $index) { $map = array(); $map["price"] = $this->nuller($po->getPrice()); $map["exp"] = $this->nuller($po->getAccessPeriod()); if ($po->getStartDateInSecs() != null && $po->getStartDateInSecs() != 0) { $map["sd"] = $this->nuller($po->getStartDateInSecs()); } if ($po->getEndDateInSecs() != null && $po->getEndDateInSecs() != 0) { $map["ed"] = $this->nuller($po->getEndDateInSecs()); } $map["cpt"] = $this->nuller($po->getCaption()); if (count($po->getSplitPays()) > 0) { $splits = array(); foreach ($po->getSplitPays() as $email => $amount) { array_push($splits, "{$email}={$amount}"); } $map["splits"] = $splits; } return $map; }