function __construct(FacebookPage $page)
 {
     parent::__construct('facebook_page');
     $this->setVariable('id', $page->getId());
     $this->setVariable('number_of_likes', $page->getNumberOfLikes());
     $this->setVariable('first_status', $page->getStatus());
 }
 function __construct(FacebookStatus $status)
 {
     parent::__construct('facebook_status');
     $this->setVariable('id', $status->getId());
     $this->setVariable('created_time', $status->getCreatedTime());
     $this->setVariable('updated_time', $status->getUpdatedTime());
     $this->setVariable('images', array_map(function ($element) {
         return get_object_vars($element);
     }, $status->getImages()));
     $this->setVariable('link', $status->getLink());
     $this->setVariable('message', $status->getMessage());
     $this->setVariable('number_of_likes', $status->getNumberOfLikes());
     $next_status = $status->getNextStatus();
     $this->setVariable('next_id', $next_status == null ? null : $next_status->getId());
     $prev_status = $status->getPreviousStatus();
     $this->setVariable('prev_id', $prev_status == null ? null : $prev_status->getId());
 }