[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Remote/Response/ -> MediaChange.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Remote\Response;
   4  
   5  /**
   6   * Represents a single change in a media file
   7   */
   8  class MediaChange extends ApiResponse
   9  {
  10      /** @var string The media ID */
  11      public $id;
  12      /** @var int The revision (timestamp) of this change */
  13      public $revision;
  14      /** @var string The author of this change */
  15      public $author;
  16      /** @var string The IP address from where this change was made */
  17      public $ip;
  18      /** @var string The summary of this change */
  19      public $summary;
  20      /** @var string The type of this change */
  21      public $type;
  22      /** @var int The change in bytes */
  23      public $sizechange;
  24  
  25      /**
  26       * MediaChange constructor.
  27       *
  28       * @param string $id
  29       * @param int $revision
  30       * @param string $author
  31       * @param string $ip
  32       * @param string $summary
  33       * @param string $type
  34       * @param int $sizechange
  35       */
  36      public function __construct($id, $revision, $author, $ip, $summary, $type, $sizechange)
  37      {
  38          $this->id = $id;
  39          $this->revision = $revision;
  40          $this->author = $author;
  41          $this->ip = $ip;
  42          $this->summary = $summary;
  43          $this->type = $type;
  44          $this->sizechange = $sizechange;
  45      }
  46  
  47      /** @inheritdoc */
  48      public function __toString()
  49      {
  50          return $this->id . '@' . $this->revision;
  51      }
  52  }