本文整理汇总了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);
}