<?php namespace Ctct\Components\EmailMarketing; use Ctct\Components\Component; class Schedule extends Component { public $id; public $scheduled_date; public static function create(array $props) { $schedule = new Schedule(); $schedule->id = parent::getValue($props, "id"); $schedule->scheduled_date = parent::getValue($props, "scheduled_date"); return $schedule; } public function toJson() { $schedule = clone $this; unset($schedule->id); return json_encode($schedule); } } 