<?php
namespace Dreamfox\DeliveryDate\Premium;

class HolidaySetting
{

  private $_countOnlyWorkingDays;
  private $_disableDays;
  private $_holidays;

  public function __construct($data)
  {
    if ($data) {
      $this->setCountOnlyWorkingDays($data->countOnlyWorkingDays);
      $this->setDisableDays($data->disableDays);
      $this->setHolidays($data->holidays);
    }
  }

  public function setCountOnlyWorkingDays($value)
  {
    $this->_countOnlyWorkingDays = (boolean)$value;
  }

  public function getCountOnlyWorkingDays()
  {
    return $this->_countOnlyWorkingDays;
  }

  public function setDisableDays($value)
  {
    $this->_disableDays = $value;
  }

  public function getDisableDays()
  {
    return $this->_disableDays;
  }

  public function setHolidays($value)
  {
    $this->_holidays = $value;
  }

  public function getHolidays()
  {
    return $this->_holidays;
  }

  public function toArray()
  {
    return [
      'countOnlyWorkingDays' => $this->getCountOnlyWorkingDays(),
      'disableDays' => $this->getDisableDays(),
      'holidays' => $this->getHolidays(),
    ];
  }
}