File: MediaChange.php

package info (click to toggle)
dokuwiki 2024-02-06b%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,624 kB
  • sloc: php: 97,851; javascript: 3,724; sh: 599; makefile: 70; xml: 34
file content (52 lines) | stat: -rw-r--r-- 1,327 bytes parent folder | download | duplicates (3)
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
<?php

namespace dokuwiki\Remote\Response;

/**
 * Represents a single change in a media file
 */
class MediaChange extends ApiResponse
{
    /** @var string The media ID */
    public $id;
    /** @var int The revision (timestamp) of this change */
    public $revision;
    /** @var string The author of this change */
    public $author;
    /** @var string The IP address from where this change was made */
    public $ip;
    /** @var string The summary of this change */
    public $summary;
    /** @var string The type of this change */
    public $type;
    /** @var int The change in bytes */
    public $sizechange;

    /**
     * MediaChange constructor.
     *
     * @param string $id
     * @param int $revision
     * @param string $author
     * @param string $ip
     * @param string $summary
     * @param string $type
     * @param int $sizechange
     */
    public function __construct($id, $revision, $author, $ip, $summary, $type, $sizechange)
    {
        $this->id = $id;
        $this->revision = $revision;
        $this->author = $author;
        $this->ip = $ip;
        $this->summary = $summary;
        $this->type = $type;
        $this->sizechange = $sizechange;
    }

    /** @inheritdoc */
    public function __toString()
    {
        return $this->id . '@' . $this->revision;
    }
}