1 | <?php |
||
13 | class PropertyId extends EntityId implements Int32EntityId { |
||
14 | |||
15 | /** |
||
16 | * @since 0.5 |
||
17 | */ |
||
18 | const PATTERN = '/^P[1-9]\d{0,9}\z/i'; |
||
19 | |||
20 | /** |
||
21 | * @param string $idSerialization |
||
22 | * |
||
23 | * @throws InvalidArgumentException |
||
24 | */ |
||
25 | public function __construct( $idSerialization ) { |
||
29 | |||
30 | private function assertValidIdFormat( $idSerialization ) { |
||
46 | |||
47 | /** |
||
48 | * @return int |
||
49 | */ |
||
50 | public function getNumericId() { |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getEntityType() { |
||
60 | |||
61 | /** |
||
62 | * @see Serializable::serialize |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function serialize() { |
||
69 | |||
70 | /** |
||
71 | * @see Serializable::unserialize |
||
72 | * |
||
73 | * @param string $serialized |
||
74 | */ |
||
75 | public function unserialize( $serialized ) { |
||
78 | |||
79 | /** |
||
80 | * Construct a PropertyId given the numeric part of its serialization. |
||
81 | * |
||
82 | * CAUTION: new usages of this method are discouraged. Typically you |
||
83 | * should avoid dealing with just the numeric part, and use the whole |
||
84 | * serialization. Not doing so in new code requires special justification. |
||
85 | * |
||
86 | * @param int|float|string $numericId |
||
87 | * |
||
88 | * @return self |
||
89 | * @throws InvalidArgumentException |
||
90 | */ |
||
91 | public static function newFromNumber( $numericId ) { |
||
98 | |||
99 | } |
||
100 |