1 | <?php |
||
7 | class Redirect implements JsonSerializable { |
||
8 | |||
9 | private $from; |
||
10 | private $to; |
||
11 | |||
12 | 1 | public function __construct( Title $from, Title $to ) { |
|
13 | 1 | $this->from = $from; |
|
14 | 1 | $this->to = $to; |
|
15 | 1 | } |
|
16 | |||
17 | /** |
||
18 | * @return Title |
||
19 | */ |
||
20 | public function getFrom() { |
||
21 | return $this->from; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return Title |
||
26 | */ |
||
27 | public function getTo() { |
||
28 | return $this->to; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
33 | */ |
||
34 | 1 | public function jsonSerialize() { |
|
40 | |||
41 | /** |
||
42 | * @param array $json |
||
43 | * |
||
44 | * @return self |
||
45 | */ |
||
46 | 1 | public static function jsonDeserialize( $json ) { |
|
52 | |||
53 | } |
||
54 |