| @@ 9-24 (lines=16) @@ | ||
| 6 | ||
| 7 | class Channel extends Base |
|
| 8 | { |
|
| 9 | function __construct($data = NULL) |
|
| 10 | { |
|
| 11 | $this->fields = array |
|
| 12 | ( |
|
| 13 | 'id' => '', |
|
| 14 | 'current' => NULL, |
|
| 15 | 'day' => NULL, |
|
| 16 | ); |
|
| 17 | ||
| 18 | if(!empty($data)) |
|
| 19 | { |
|
| 20 | parent::__construct(array('id' => $data['id'])); |
|
| 21 | $this->fields['current'] = new Current($data['curr']); |
|
| 22 | $this->fields['day'] = new Day($data['day']); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | } |
|
| @@ 16-31 (lines=16) @@ | ||
| 13 | class Solar extends Base implements IPacket |
|
| 14 | { |
|
| 15 | ||
| 16 | function __construct($data = NULL) |
|
| 17 | { |
|
| 18 | $this->fields = array |
|
| 19 | ( |
|
| 20 | 'id' => '', |
|
| 21 | 'current' => NULL, |
|
| 22 | 'day' => NULL |
|
| 23 | ); |
|
| 24 | ||
| 25 | if(!empty($data)) |
|
| 26 | { |
|
| 27 | parent::__construct(array('id' => $data['id'])); |
|
| 28 | $this->fields['current'] = new Current($data['current']); |
|
| 29 | $this->fields['day'] = new Day($data['day']); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| 33 | /* |
|
| 34 | * returns the Domain's type |
|