Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Event {
- public $id;
- public $title;
- public $description
- public $start;
- public $end;
- public function __construc($event)
- {
- if(is_array($event)){
- $this->id = $event['event_id'];
- $this->id = $event['event_title'];
- $this->description = $event['event_desc'];
- $this->start = $event['event_start'];
- $this->end = $event['event_end'];
- }
- else{
- throw new Exception("No event data was suplied.")
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement