code: public function fromArray($data)
      {
          $this->points = [];
          if (is_array($data)) {
              foreach ($data as $dataPoint) {
                  $point = new TimePoint();
                  $point->fromArray($dataPoint);
                  $this->points[] = $point;
              }
          }
      }
docs: Imports the internal state from an array
  @param array $data