xref: /dokuwiki/inc/Remote/Response/PageChange.php (revision 8268b284d42dee1f36da2a61bd2c69ee9fa8aa33)
158ae4747SAndreas Gohr<?php
258ae4747SAndreas Gohr
358ae4747SAndreas Gohrnamespace dokuwiki\Remote\Response;
458ae4747SAndreas Gohr
558ae4747SAndreas Gohr/**
658ae4747SAndreas Gohr * Represents a single change in a wiki page
758ae4747SAndreas Gohr */
858ae4747SAndreas Gohrclass PageChange extends ApiResponse
958ae4747SAndreas Gohr{
1058ae4747SAndreas Gohr    /** @var string The page ID */
1158ae4747SAndreas Gohr    public $id;
1258ae4747SAndreas Gohr    /** @var int The revision (timestamp) of this change */
1358ae4747SAndreas Gohr    public $revision;
1458ae4747SAndreas Gohr    /** @var string The author of this change */
1558ae4747SAndreas Gohr    public $author;
1658ae4747SAndreas Gohr    /** @var string The IP address from where this change was made */
1758ae4747SAndreas Gohr    public $ip;
1858ae4747SAndreas Gohr    /** @var string The summary of this change */
1958ae4747SAndreas Gohr    public $summary;
2058ae4747SAndreas Gohr    /** @var string The type of this change */
2158ae4747SAndreas Gohr    public $type;
2258ae4747SAndreas Gohr    /** @var int The change in bytes */
2358ae4747SAndreas Gohr    public $sizechange;
2458ae4747SAndreas Gohr
2558ae4747SAndreas Gohr    /**
2658ae4747SAndreas Gohr     * PageChange constructor.
2758ae4747SAndreas Gohr     *
2858ae4747SAndreas Gohr     * @param string $id
2958ae4747SAndreas Gohr     * @param int $revision
3058ae4747SAndreas Gohr     * @param string $author
3158ae4747SAndreas Gohr     * @param string $ip
3258ae4747SAndreas Gohr     * @param string $summary
3358ae4747SAndreas Gohr     * @param string $type
3458ae4747SAndreas Gohr     * @param int $sizechange
3558ae4747SAndreas Gohr     */
3658ae4747SAndreas Gohr    public function __construct($id, $revision, $author, $ip, $summary, $type, $sizechange)
3758ae4747SAndreas Gohr    {
3858ae4747SAndreas Gohr        $this->id = $id;
3958ae4747SAndreas Gohr        $this->revision = $revision;
4058ae4747SAndreas Gohr        $this->author = $author;
4158ae4747SAndreas Gohr        $this->ip = $ip;
4258ae4747SAndreas Gohr        $this->summary = $summary;
4358ae4747SAndreas Gohr        $this->type = $type;
4458ae4747SAndreas Gohr        $this->sizechange = $sizechange;
4558ae4747SAndreas Gohr    }
46*8268b284SAndreas Gohr
47*8268b284SAndreas Gohr    /** @inheritdoc */
48*8268b284SAndreas Gohr    public function __toString()
49*8268b284SAndreas Gohr    {
50*8268b284SAndreas Gohr        return $this->id . '@' . $this->revision;
51*8268b284SAndreas Gohr    }
5258ae4747SAndreas Gohr}
53