protected function loadInventory($inventory)
    {
        if (is_array($inventory) && count($inventory) > 0) {
            $this->inventory = new Inventory();

            foreach ($inventory as $bookingClass => $availabilityAmount) {
                $this->inventory->bookingClassDetails[] = new BookingClassDetails(
                    $bookingClass,
                    $availabilityAmount
                );
            }
        }
    }
protected function loadInventory($inventory)
    {
        if (is_array($inventory) && count($inventory) > 0) {
            $this->inventory = new Inventory();

            foreach ($inventory as $bookingClass => $availabilityAmount) {
                $this->inventory->bookingClassDetails[] = new BookingClassDetails(
                    $bookingClass,
                    $availabilityAmount
                );
            }
        }
    }
protected function loadInventory ( $ inventory ) { if ( is_array ( $ inventory ) && count ( $ inventory ) > 0 ) { $ this -> inventory = new Inventory ( ) ; foreach ( $ inventory as $ bookingClass => $ availabilityAmount ) { $ this -> inventory -> bookingClassDetails [ ] = new BookingClassDetails ( $ bookingClass , $ availabilityAmount ) ; } } }
Load inventory information

@param array $inventory
Load inventory information