本文整理匯總了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();
}