| 1 | <?php |
||
| 8 | class PageIdentifier implements JsonSerializable { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var int|null |
||
| 12 | */ |
||
| 13 | private $id; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var Title|null |
||
| 17 | */ |
||
| 18 | private $title; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param Title|null $title |
||
| 22 | * @param int|null $id |
||
| 23 | * @throws InvalidArgumentException |
||
| 24 | */ |
||
| 25 | 8 | public function __construct( Title $title = null, $id = null ) { |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return int|null |
||
| 35 | */ |
||
| 36 | 4 | public function getId() { |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return Title|null |
||
| 42 | */ |
||
| 43 | 4 | public function getTitle() { |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Does this object identify a page |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | 4 | public function identifiesPage() { |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
| 60 | */ |
||
| 61 | 4 | public function jsonSerialize() { |
|
| 71 | |||
| 72 | /** |
||
| 73 | * @param array $array |
||
| 74 | * |
||
| 75 | * @returns self |
||
| 76 | */ |
||
| 77 | 4 | public static function jsonDeserialize( $array ) { |
|
| 84 | } |
||
| 85 |