Example #1
0
 /**
  *
  * @param unknown $data
  */
 public function updateLesson($data)
 {
     $result = false;
     $pdo = DbUtil::connect();
     $dao = new M05LessonDao($pdo);
     // create new category object
     $obj = new M05LessonBO();
     // get id from request
     if (property_exists($data, 'id')) {
         $obj->setm05lessonid($data->id);
     }
     // get the persistance obj from db
     $obj = $dao->getById($obj);
     $obj->import($data);
     $result = $dao->update($obj);
     DbUtil::disconnect();
     return $result;
 }