PHP Classes

File: apps/MS-AvailableHotels/app/Transformers/BestHotelsTransformer.php

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Hotel Booking Available   apps/MS-AvailableHotels/app/Transformers/BestHotelsTransformer.php   Download  
File: apps/MS-AvailableHotels/app/Transformers/BestHotelsTransformer.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Hotel Booking Available
Search for hotels that are available for booking
Author: By
Last change:
Date: 2 years ago
Size: 463 bytes
 

Contents

Class file image Download
<?php
namespace App\Transformers;

/**
 *
 */
class BestHotelsTransformer implements ITransformer
{
    public function
__construct()
    {
    }

    public function
transform(array $item)
    {
        return [
           
'provider' => 'bestHotels',
           
'hotelName' => $item['hotel'],
           
'rate' => $item['hotelRate'],
           
'fare' => $item['hotelFare'],
           
'amenities' => explode(',', $item['roomAmenities'])
        ];
    }
}