@@ 115-128 (lines=14) @@ | ||
112 | * @throws InvalidArgumentException If the argument is not a string. |
|
113 | * @return self |
|
114 | */ |
|
115 | public function setLang($lang) |
|
116 | { |
|
117 | if ($lang !== null) { |
|
118 | if (!is_string($lang)) { |
|
119 | throw new InvalidArgumentException( |
|
120 | 'Language must be a string' |
|
121 | ); |
|
122 | } |
|
123 | } |
|
124 | ||
125 | $this->lang = $lang; |
|
126 | ||
127 | return $this; |
|
128 | } |
|
129 | ||
130 | /** |
|
131 | * Retrieve the language. |
|
@@ 147-160 (lines=14) @@ | ||
144 | * @throws InvalidArgumentException If the argument is not a string. |
|
145 | * @return self |
|
146 | */ |
|
147 | public function setOrigin($origin) |
|
148 | { |
|
149 | if ($origin !== null) { |
|
150 | if (!is_string($origin)) { |
|
151 | throw new InvalidArgumentException( |
|
152 | 'Origin must be a string.' |
|
153 | ); |
|
154 | } |
|
155 | } |
|
156 | ||
157 | $this->origin = $origin; |
|
158 | ||
159 | return $this; |
|
160 | } |
|
161 | ||
162 | /** |
|
163 | * Resolve the origin of the user data. |