Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Weather {
- private $time;
- private $rain;
- function setTime(\DateTime $time) {
- $this->time = $time;
- }
- function getTime() {
- return $this->time;
- }
- function setRain(Rain $rain) {
- $this->rain = $rain;
- }
- function getRain() {
- return $rain;
- }
- }
- class Rain {
- private $description;
- function setDescription($description) {
- $this->description = $description;
- }
- function getDescription() {
- return $this->desc;
- }
- }
- /**
- Should return:
- object (Weather)
- time
- - timestamp = "2601024202422"
- rain
- - description = string "Testing"
- Instead it returns:
- object (Weather)
- time
- - timestamp = "2601024202422"
- rain {}
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement