| 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 | public function __construct( Title $title = null, $id = null ) { |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return int|null |
||
| 35 | */ |
||
| 36 | public function getId() { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return Title|null |
||
| 42 | */ |
||
| 43 | public function getTitle() { |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Does this object identify a page |
||
| 49 | * |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public function identifiesPage() { |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
| 58 | */ |
||
| 59 | public function jsonSerialize() { |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param array $array |
||
| 72 | * |
||
| 73 | * @return self |
||
| 74 | */ |
||
| 75 | public static function jsonDeserialize( $array ) { |
||
| 82 | } |
||
| 83 |