1<?php 2 3namespace dokuwiki\plugin\translation; 4 5use dokuwiki\Remote\Response\ApiResponse; 6 7class OutdatedTranslationApiResponse extends ApiResponse 8{ 9 /** @var string The page ID */ 10 public $id; 11 12 /** @var string The language code of this translation */ 13 public $lang; 14 15 /** @var int The unix timestamp of the last modified date of this page, 0 if it does not exist */ 16 public $lastModified; 17 18 /** @var string The page ID of the original page */ 19 public $originalID; 20 21 /** @var int The unix timestamp of the last modified date of this page, 0 if it does not exist */ 22 public $originalModified; 23 24 /** @var string The status of this translation. Either "missing" or "outdated" */ 25 public $status; 26 27 public function __construct($origPage, $transID, $transMod, $transLang, $status) 28 { 29 $this->id = $transID; 30 $this->lang = $transLang; 31 $this->lastModified = (int) $transMod; 32 $this->originalID = $origPage['id']; 33 $this->originalModified = $origPage['mtime']; 34 $this->status = $status; 35 } 36 37 38 public function __toString() 39 { 40 return $this->id; 41 } 42} 43