本文整理汇总了PHP中AbstractObject::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractObject::insert方法的具体用法?PHP AbstractObject::insert怎么用?PHP AbstractObject::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractObject
的用法示例。
在下文中一共展示了AbstractObject::insert方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
/**
* Insert the link between $type and the Attachment
* @return bool
*/
function insert()
{
if (!is_numeric($this->linked->id)) {
$this->setLinkedIdFromString($this->linked->id);
}
return parent::insert();
}
示例2: insert
/**
* Automatically adds the next revision id, the user who does the save and the current timestamp
*/
function insert()
{
$this->revision_id = $this->_getNextRevision();
$this->user = new User($this->db, $_SESSION['user_id']);
$this->revision_datetime = date('Y-m-d H:i:s');
parent::insert();
}
示例3: insert
/**
* (non-PHPdoc)
* @see AbstractObject#insert($graceful)
*/
function insert()
{
$this->created = date('Y-m-d H:i:s');
$this->hash = $this->_uniqueHash();
$this->user = $_SESSION['user_id'] > 0 ? new User($this->db, $_SESSION['user_id']) : null;
$this->character = htmlentities($this->character);
$this->action = htmlentities($this->action);
return parent::insert();
}
示例4: insert
/**
* Inserts a new user
* @return int $id
*/
function insert()
{
$this->id = $this->_selectNewId();
parent::insert();
return $this->id;
}