本文整理汇总了PHP中SimpleORMap::restore方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleORMap::restore方法的具体用法?PHP SimpleORMap::restore怎么用?PHP SimpleORMap::restore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleORMap
的用法示例。
在下文中一共展示了SimpleORMap::restore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: restore
public function restore()
{
parent::restore();
if ($this['topic_id'] === $this['root_id']) {
$db = DBManager::get();
$this->content['discussion_time'] = $db->query("SELECT mkdate " . "FROM px_topics " . "WHERE root_id = " . $db->quote($this->getId()) . " " . "ORDER BY mkdate DESC " . "LIMIT 1 " . "")->fetch(PDO::FETCH_COLUMN, 0);
} else {
$this->content['discussion_time'] = $this['mkdate'];
}
}
示例2: restore
public function restore()
{
$found = parent::restore();
if ($found) {
$db = DBManager::get();
$st = $db->prepare("SELECT a.property_id, state, mkdate, chdate, type, name, options, system\n FROM resources_requests_properties a\n LEFT JOIN resources_properties b USING (property_id)\n WHERE a.request_id=? ");
if ($st->execute(array($this->getId()))) {
$this->properties = array_map('array_shift', $st->fetchAll(PDO::FETCH_ASSOC | PDO::FETCH_GROUP));
$this->properties_changed = false;
}
} else {
$this->inititalizeProperties();
}
return $found;
}
示例3: restore
public function restore()
{
parent::restore();
$this->cbUnserializeData();
}