本文整理汇总了PHP中DB_DataObject::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_DataObject::insert方法的具体用法?PHP DB_DataObject::insert怎么用?PHP DB_DataObject::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_DataObject
的用法示例。
在下文中一共展示了DB_DataObject::insert方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
function insert()
{
//Update publication date if it hasn't been set already.
if (!isset($this->pubDate)) {
$this->pubDate = time();
}
$ret = parent::insert();
return $ret;
}
示例2: insert
function insert()
{
$ret = parent::insert();
//Load the person this is for, and update solr
if ($this->personId) {
require_once ROOT_DIR . '/sys/Genealogy/Person.php';
$person = Person::staticGet('personId', $this->personId);
$person->saveToSolr();
}
return $ret;
}
示例3: insertDetailed
function insertDetailed($insertInSolr = true)
{
$result = parent::insert($insertInSolr);
if (!$insertInSolr) {
return $result;
} else {
if ($result !== 0) {
if (!$this->saveToSolr()) {
//Could not save to solr
return false;
}
} else {
return false;
}
return true;
}
}
示例4: insert
function insert()
{
if (!isset($this->source) || $this->source == '') {
$this->source = 'VuFind';
}
parent::insert();
}
示例5: insert
function insert()
{
$result = parent::insert();
return $result;
}
示例6: insert
/**
* Override the update functionality to save the associated lists
*
* @see DB/DB_DataObject::insert()
*/
public function insert()
{
$ret = parent::insert();
if ($ret === FALSE) {
return $ret;
} else {
$this->saveLists();
}
return true;
}
示例7: insert
/**
* Override the update functionality to save the related objects
*
* @see DB/DB_DataObject::insert()
*/
public function insert()
{
$ret = parent::insert();
if ($ret !== FALSE) {
$this->saveSubBrowseCategories();
}
return $ret;
}
示例8: insert
function insert()
{
parent::insert();
global $memCache;
$memCache->delete('loan_rule_determiners');
}
示例9: insert
function insert()
{
$this->calcIpRange();
return parent::insert();
}
示例10: insert
function insert()
{
$this->created = time();
$this->dateUpdated = time();
parent::insert();
}
示例11: insert
function insert()
{
$result = $this->trigger('insert');
switch (true) {
case $result === 'bypass':
return true;
break;
case $result === 'fail':
return false;
break;
default:
if (parent::insert()) {
DB_DataObject_Pluggable::storeToRegistry($this);
$this->trigger('postinsert');
return true;
}
return false;
}
}
示例12: insert
public function insert()
{
// avoid those annoying PEAR::DB strict standards warnings it causes
$old = error_reporting();
error_reporting(error_reporting() & ~E_STRICT);
$res = parent::insert();
// reset
error_reporting($old);
return $res;
}
示例13: insert
/**
* Override the update functionality to save the related objects
*
* @see DB/DB_DataObject::insert()
*/
public function insert()
{
$ret = parent::insert();
if ($ret === FALSE) {
return $ret;
} else {
$this->saveHolidays();
$this->saveNearbyBookStores();
$this->saveFacets();
$this->saveSearchSources();
return $ret;
}
}
示例14: insert
function insert()
{
//set default values as needed
if (!isset($this->homeLocationId)) {
$this->homeLocationId = 0;
}
if (!isset($this->myLocation1Id)) {
$this->myLocation1Id = 0;
}
if (!isset($this->myLocation2Id)) {
$this->myLocation2Id = 0;
}
if (!isset($this->bypassAutoLogout)) {
$this->bypassAutoLogout = 0;
}
parent::insert();
$this->saveRoles();
}
示例15: insert
/**
* Override the update functionality to save the related objects
*
* @see DB/DB_DataObject::insert()
*/
public function insert()
{
if (isset($this->showInMainDetails) && is_array($this->showInMainDetails)) {
// convert array to string before storing in database
$this->showInMainDetails = serialize($this->showInMainDetails);
}
$ret = parent::insert();
if ($ret !== FALSE) {
$this->saveHolidays();
$this->saveNearbyBookStores();
$this->saveFacets();
$this->saveSearchSources();
$this->saveLibraryLinks();
$this->saveLibraryTopLinks();
$this->saveBrowseCategories();
$this->saveMoreDetailsOptions();
}
return $ret;
}