示例#1
0
 public static function newFromRow($row)
 {
     $draft = new Draft($row['draft_id'], false);
     $draft->setToken($row['draft_token']);
     $draft->setTitle(Title::makeTitle($row['draft_namespace'], $row['draft_title']));
     $draft->setSection($row['draft_section']);
     $draft->setStartTime($row['draft_starttime']);
     $draft->setEditTime($row['draft_edittime']);
     $draft->setSaveTime($row['draft_savetime']);
     $draft->setScrollTop($row['draft_scrolltop']);
     $draft->setText($row['draft_text']);
     $draft->setSummary($row['draft_summary']);
     $draft->setHtml5($row['draft_htmlfive']);
     $draft->setMinorEdit($row['draft_minoredit']);
     return $draft;
 }
示例#2
0
 /**
  * Creates a new Draft object from a database row
  *
  * @param $row Object: Database row object to create Draft object with
  * @return Draft object
  */
 public static function newFromRow($row)
 {
     $draft = new Draft($row->draft_id, false);
     $draft->setToken($row->draft_token);
     $draft->setTitle(Title::makeTitle($row->draft_namespace, $row->draft_title));
     $draft->setSection($row->draft_section);
     $draft->setStartTime($row->draft_starttime);
     $draft->setEditTime($row->draft_edittime);
     $draft->setSaveTime($row->draft_savetime);
     $draft->setScrollTop($row->draft_scrolltop);
     $draft->setText($row->draft_text);
     $draft->setSummary($row->draft_summary);
     $draft->setMinorEdit($row->draft_minoredit);
     return $draft;
 }