Advertisement
Guest User

Untitled

a guest
May 21st, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. class Event {
  4. public $id;
  5. public $title;
  6. public $description
  7. public $start;
  8. public $end;
  9.  
  10. public function __construc($event)
  11. {
  12. if(is_array($event)){
  13. $this->id = $event['event_id'];
  14. $this->id = $event['event_title'];
  15. $this->description = $event['event_desc'];
  16. $this->start = $event['event_start'];
  17. $this->end = $event['event_end'];
  18.  
  19. }
  20. else{
  21. throw new Exception("No event data was suplied.")
  22. }
  23. }
  24. }
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement