Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP
  • Overview
  • Namespace
  • Class
  • Tree
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 
<?php
namespace Apptus\ESales\Connector\Report;

/**
 * A class representing time slots in the reports.
 *
 * Each time slot has a start and end together with a name and value of any kind.
 *
 * Times are in seconds since the unix epoch. Note that strings are used for times
 * instead of integers to avoid problems for 32 bit PHP.
 */
class TimeSlot {
    private $start;
    private $end;
    private $name;
    private $value;

    /**
     * @param string
     * @param string
     * @param string|null
     * @param mixed
     */
    public function __construct($start, $end, $name, $value) {
        $this->start = $start;
        $this->end = $end;
        $this->name = $name;
        $this->value = $value;
    }

    /**
     * @return string
     *            The start of this time slot (inclusive).
     */
    public function slotStartTime() {
        return $this->start;
    }

    /**
     * @return string
     *            The end of this time slot (exclusive).
     */
    public function slotEndTime() {
        return $this->end;
    }

    /**
     * @return string|null
     *            The name of the time slot. Note that the name may be null or empty.
     */
    public function __toString() {
        return $this->name;
    }

    /**
     * @return mixed
     *            The value for this time slot. Note that the value may be null.
     */
    public function value() {
        return $this->value;
    }
}
Apptus ESales Connector PHP API documentation generated by ApiGen