本文整理汇总了PHP中PHPWS_DB::saveObject方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_DB::saveObject方法的具体用法?PHP PHPWS_DB::saveObject怎么用?PHP PHPWS_DB::saveObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPWS_DB
的用法示例。
在下文中一共展示了PHPWS_DB::saveObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save()
{
$db = new PHPWS_DB('checkin_visitor');
if (empty($this->arrival_time)) {
$this->arrival_time = time();
}
return $db->saveObject($this);
}
示例2: save
public function save()
{
$db = new PHPWS_DB('analytics_tracker');
$result = $db->saveObject($this);
if (PHPWS_Error::logIfError($result)) {
return $result;
}
}
示例3: save
public function save()
{
$db = new \PHPWS_DB('prop_report');
if (!$this->id) {
$this->date_sent = time();
}
return $db->saveObject($this);
}
示例4: save
/**
* Saves a new or updated floor hall object
*/
public function save()
{
$db = new PHPWS_DB('hms_floor');
$result = $db->saveObject($this);
if (!$result || PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->toString());
}
}
示例5: save
public function save($insert = TRUE)
{
$db = new PHPWS_DB('search_stats');
$this->keyword = trim($this->keyword);
if (!$insert) {
$db->addWhere('keyword', $this->keyword);
}
return $db->saveObject($this);
}
示例6: save
public function save()
{
if (!$this->to_user_id || !$this->from_user_id) {
return \PHPWS_Error('Cannot save message.');
}
$this->date_sent = time();
$db = new \PHPWS_DB('prop_messages');
return $db->saveObject($this);
}
示例7: save
/**
* Saves the current Assignment object to the database.
*/
public function save()
{
$db = new PHPWS_DB('hms_learning_community_assignment');
$result = $db->saveObject($this);
if (PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->toString());
}
return TRUE;
}
示例8: save
public function save()
{
$db = new PHPWS_DB('hms_special_assignment');
$result = $db->saveObject($this);
if (PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->getMessage());
}
return true;
}
示例9: save
public function save()
{
$db = new PHPWS_DB('hms_eligibility_waiver');
$result = $db->saveObject($this);
if (!$result || PHPWS_Error::logIfError($result)) {
return false;
}
return true;
}
示例10: save
public function save()
{
$this->stamp();
$db = new PHPWS_DB('hms_residence_hall');
$result = $db->saveObject($this);
if (!$result || PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->toString());
}
return true;
}
示例11: save
/**
* Saves this queue item
*/
public function save()
{
$db = new PHPWS_DB('hms_banner_queue');
$this->stamp();
$result = $db->saveObject($this);
if (PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->toString());
}
return TRUE;
}
示例12: save
public function save($key_id)
{
$db = new PHPWS_DB('ps_text');
$result = $db->saveObject($this);
if (PHPWS_Error::isError($result)) {
return $result;
}
$search = new Search($key_id);
$search->addKeywords($this->content);
return $search->save();
}
示例13: save
/**
* Saves this term object.
*/
public function save()
{
$db = new PHPWS_DB('hms_term');
// "where" breaks the save if creating new term
if (!$this->isNew) {
$db->addWhere('term', $this->term);
}
$result = $db->saveObject($this);
if (PHPWS_Error::logIfError($result)) {
throw new DatabaseException($result->toString());
}
}
示例14: save
public function save($term)
{
$this->term = $term;
$this->timestamp = time();
$db = new PHPWS_DB('hms_student_cache');
try {
$result = $db->saveObject($this);
} catch (\Exception $e) {
// Silently log any errors
PHPWS_Error::logIfError($e);
}
}
示例15: save
/**
* Saves the given object to the database.
* @param Object $obj
*/
public static function save(DbStorable $obj)
{
$db = new \PHPWS_DB($obj->getTableName());
try {
$result = $db->saveObject($obj);
} catch (\Exception $e) {
// rethrow any exceptions
throw $e;
}
if (\PHPWS_Error::logIfError($result)) {
throw new \Exception($result->toString());
}
return $obj->id;
}