本文整理汇总了PHP中DB_DataObject::tableName方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_DataObject::tableName方法的具体用法?PHP DB_DataObject::tableName怎么用?PHP DB_DataObject::tableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_DataObject
的用法示例。
在下文中一共展示了DB_DataObject::tableName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: attachTo
public function attachTo(DB_DataObject $owner, $obj)
{
$obj->record_table = $owner->tableName();
$obj->record_id = $owner->pk();
$obj->save();
}
示例4: create
public static function create(DB_DataObject $do)
{
$class = 'Presenter_' . $do->tableName();
return new $class($do);
}
示例5: setRecord
public function setRecord(DB_DataObject $record)
{
$this->record_id = $record->pk();
$this->tagged_table = $record->tableName();
}
示例6: object
/**
* set or get the dataobject this image is associated with
* @param DB_DataObject $obj An object to associate this image with
* (does not store it - you need to call update() to do that)
* @return DB_DataObject the dataobject this image is attached to.
*/
function object($obj = false)
{
if ($obj === false) {
if (empty($this->ontable) || empty($this->onid)) {
return false;
}
$ret = DB_DataObject::factory($this->ontable);
$ret->get($this->onid);
return $ret;
}
$this->ontable = $obj->tableName();
$this->onid = $obj->id;
/// assumes our nice standard of using ids..
return $obj;
}
示例7: 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);
}