1 | <?php |
||
7 | class UserIdentifier implements ApiParameters |
||
8 | { |
||
9 | /** @var int */ |
||
10 | private $id; |
||
11 | |||
12 | /** @var string */ |
||
13 | private $screenName; |
||
14 | |||
15 | /** |
||
16 | * UserIdentifier constructor. |
||
17 | * |
||
18 | * @param int $id |
||
19 | * @param string $screenName |
||
20 | */ |
||
21 | 69 | private function __construct($id, $screenName) |
|
27 | |||
28 | /** |
||
29 | * @param int $id |
||
30 | * |
||
31 | * @return UserIdentifier |
||
32 | */ |
||
33 | 57 | public static function fromId($id) |
|
37 | |||
38 | /** |
||
39 | * @param string $screenName |
||
40 | * |
||
41 | * @return UserIdentifier |
||
42 | */ |
||
43 | 15 | public static function fromScreenName($screenName) |
|
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | 30 | public function toArray() |
|
63 | } |
||
64 |