/** * Set the rating. * * @param string $rating * * @return void */ public function setRating($rating) { if (!empty($rating)) { $rating = str_replace(' out of 5 stars', '', $rating); parent::setRating($rating); } }
/** * Format and set the price for this app. * * @param string * * @return void */ public function setPrice($price) { if (!empty($price)) { $price = trim(strtolower($price)); if ($price == 'install') { $price = '0.00'; } else { $price = str_replace('buy', '', $price); $price = str_replace('$', '', $price); $price = trim($price); } parent::setPrice($price); } }