/** * Creates a new screenshot */ public function __construct($layers, $events, $eventLabels, $scale, $scaleType, $scaleX, $scaleY, $obsDate, $roi, $options) { parent::__construct($layers, $events, $eventLabels, $scale, $scaleType, $scaleX, $scaleY, $obsDate, $roi, $options); if (array_key_exists('action', $options) && $options['action'] == 'downloadScreenshot') { $this->id = $options['id']; $this->timestamp = $options['timestamp']; $this->date = $options['observationDate']; } else { $this->id = $this->_getScreenshotId(); $this->timestamp = date('Y-m-d'); } $this->build($this->_buildFilepath()); //TODO: Either include a status field in db, or remove entry if // build fails? }
/** * Helioviewer movie frame */ public function __construct($filepath, $layers, $events, $eventsLabels, $scale, $scaleType, $scaleX, $scaleY, $obsDate, $roi, $options) { parent::__construct($layers, $events, $eventsLabels, $scale, $scaleType, $scaleX, $scaleY, $obsDate, $roi, $options); $this->build($filepath); }