本文整理匯總了PHP中DB_DataObject::pk方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_DataObject::pk方法的具體用法?PHP DB_DataObject::pk怎麽用?PHP DB_DataObject::pk使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DB_DataObject
的用法示例。
在下文中一共展示了DB_DataObject::pk方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _newImage
protected function _newImage(DB_DataObject $obj)
{
$defs = $obj->_getPluginsDef();
$tbl = DB_DataObject::factory($defs['otfimagereceiver']['table']);
$tbl->record_table = $obj->tableName();
$tbl->record_id = $obj->pk();
return $tbl;
}
示例2: log
public function log($message, $messagecode, DB_DataObject $obj)
{
self::getLogger()->info(vsprintf('[%1$s %2$s %5$s %3$s] %3$s %4$s %1$s ID %2$s', array($obj->tableName(), $obj->pk(), self::getUsername(), $message, $messagecode)));
}
示例3: setRecord
public function setRecord(DB_DataObject $record)
{
$this->record_id = $record->pk();
$this->tagged_table = $record->tableName();
}
示例4: attachTo
public function attachTo(DB_DataObject $owner, $obj)
{
$obj->record_table = $owner->tableName();
$obj->record_id = $owner->pk();
$obj->save();
}
示例5: getTagLastHistory
public function getTagLastHistory($tag, $direction, DB_DataObject $obj)
{
if (!($tag = $this->_getTagFromTag($tag))) {
return self::returnStatus(false);
}
$h = DB_DataObject::factory('tag_history');
$h->tag_id = $tag->id;
$h->record_id = $obj->pk();
$h->tagged_table = $obj->tableName();
$h->direction = $direction;
$h->orderBy('date DESC');
$h->find(true);
return self::returnStatus($h);
}