public function getAllPackList() { $packs = $this->packDao->getAllPacks(); $packList = array(); foreach ($packs as $packDto) { $price = floatval($packDto->price); $packList[] = array('id' => $packDto->id, 'credits' => $packDto->credits, 'price' => $price, 'title' => $this->getPackTitle($price, $packDto->credits)); } return $packList; }