コード例 #1
0
 public function __construct(Speakerinvite $invite)
 {
     $this->id = $invite->getId();
     $this->userId = $invite->getUserId();
     $this->lectureId = $invite->getLectureId();
 }
コード例 #2
0
 private static function insert(Speakerinvite $model)
 {
     $db = Db::getInstance(\ConferenceScheduler\Configs\DatabaseConfig::DB_INSTANCE);
     $query = "INSERT INTO speakerinvites (userId,lectureId) VALUES (:userId, :lectureId);";
     $result = $db->prepare($query);
     $result->execute([':userId' => $model->getUserId(), ':lectureId' => $model->getLectureId()]);
     $model->setId($db->lastInsertId());
 }