@@ 201-213 (lines=13) @@ | ||
198 | * @param string $key Property to set. |
|
199 | * @param mixed $value Value to assign to the property. |
|
200 | */ |
|
201 | public function __set( $key, $value ) { |
|
202 | switch ( $key ) { |
|
203 | case 'id': |
|
204 | $this->id = (int) $value; |
|
205 | break; |
|
206 | case 'blog_id': |
|
207 | case 'site_id': |
|
208 | $this->blog_id = (string) $value; |
|
209 | break; |
|
210 | default: |
|
211 | $this->$key = $value; |
|
212 | } |
|
213 | } |
|
214 | ||
215 | /** |
|
216 | * Set the site name assigned to the network if one has not been populated. |
@@ 307-318 (lines=12) @@ | ||
304 | * @param string $key Property to set. |
|
305 | * @param mixed $value Value to assign to the property. |
|
306 | */ |
|
307 | public function __set( $key, $value ) { |
|
308 | switch ( $key ) { |
|
309 | case 'id': |
|
310 | $this->blog_id = (string) $value; |
|
311 | break; |
|
312 | case 'network_id': |
|
313 | $this->site_id = (string) $value; |
|
314 | break; |
|
315 | default: |
|
316 | $this->$key = $value; |
|
317 | } |
|
318 | } |
|
319 | ||
320 | /** |
|
321 | * Retrieves the details for this site. |