本文整理汇总了PHP中WebVista_Model_ORM::audit方法的典型用法代码示例。如果您正苦于以下问题:PHP WebVista_Model_ORM::audit方法的具体用法?PHP WebVista_Model_ORM::audit怎么用?PHP WebVista_Model_ORM::audit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebVista_Model_ORM
的用法示例。
在下文中一共展示了WebVista_Model_ORM::audit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: persist
public function persist()
{
if ($this->_persistMode === WebVista_Model_ORM::DELETE) {
$db = Zend_Registry::get('dbAdapter');
$sql = $this->toSQL();
$code = preg_replace('/[^a-z_0-9- \\.]/i', '', $this->code);
$sql .= " AND `code` = '{$code}'";
$db->query($sql);
$this->postPersist();
if ($this->shouldAudit()) {
WebVista_Model_ORM::audit($this);
}
} else {
parent::persist();
}
return $this;
}
示例2: persist
public function persist()
{
if ($this->_persistMode == WebVista_Model_ORM::DELETE) {
return parent::persist();
}
$db = Zend_Registry::get('dbAdapter');
$genericDataId = (int) $this->genericDataId;
$data = $this->toArray();
if ($genericDataId > 0) {
$ret = $db->update($this->_table, $data, 'genericDataId = ' . $genericDataId);
} else {
$this->genericDataId = WebVista_Model_ORM::nextSequenceId();
$data['genericDataId'] = $this->genericDataId;
$ret = $db->insert($this->_table, $data);
}
if ($this->shouldAudit()) {
WebVista_Model_ORM::audit($this);
}
return $this;
}
示例3: persist
/**
* Persist an ordo to the database
*
* @param ORDataObject $ordo
*/
function persist()
{
$db = Zend_Registry::get('dbAdapter');
$this->_inPersist = true;
$sql = $this->toSQL();
$this->_inPersist = false;
//echo $sql . "<br />";ob_flush();
$stmt = $db->query($sql);
$stmt->closeCursor();
$this->postPersist();
if ($this instanceof Document && $this->signatureNeeded()) {
ESignature::createSignatureEntry($this);
}
if ($this->shouldAudit() && get_class($this) != "Audit" && get_class($this) != "AuditValue") {
WebVista_Model_ORM::audit($this);
}
return $this;
}