本文整理汇总了PHP中Draft::setToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Draft::setToken方法的具体用法?PHP Draft::setToken怎么用?PHP Draft::setToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Draft
的用法示例。
在下文中一共展示了Draft::setToken方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newFromRow
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: newFromRow
/**
* 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;
}