本文整理汇总了PHP中Record::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Record::set方法的具体用法?PHP Record::set怎么用?PHP Record::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Record
的用法示例。
在下文中一共展示了Record::set方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRecordAddAttribute
public function testRecordAddAttribute()
{
$r = new Response();
$re = new Record();
$re->set("foo", "bar");
$r->append($re);
$expected = '<Response><Record foo="bar"></Record></Response>';
$this->assertXmlStringEqualsXmlString($expected, $r->asUrl(False));
}
示例2: addSignInput
public function addSignInput($post)
{
if (isset($post['comment'])) {
$this->record->set('comment', $post['comment']);
$this->record->saveToDB();
}
if (isset($post['presignpt'])) {
if ($post['presignpt'] && $this->user->canPreSign()) {
$this->record->preSignRecord();
}
}
if (isset($post['unpresignpt'])) {
if ($post['unpresignpt'] && $this->user->canUnPreSign()) {
$this->record->unPreSignRecord();
}
}
if (isset($post['signpt'])) {
if ($post['signpt'] && $this->user->canSign()) {
$this->record->signRecord();
$this->record->preSignRecord();
}
}
if (isset($post['unsignpt'])) {
if ($post['unsignpt'] && $this->user->canUnsign()) {
$this->record->unsignRecord();
}
}
}
示例3: insertData
function insertData($values)
{
$source = new Record($this->dbcon);
$source->setSource($this->datatable);
$source->set($values);
$sql = $source->debug_insertSQL();
if ($this->dbcon->Execute($sql)) {
AMP::debug_sql($sql, get_class($this) . ' insert');
return $this->dbcon->Affected_Rows();
}
trigger_error(sprintf(AMP_TEXT_ERROR_DATABASE_SQL_FAILED, get_class($this), 'insert', $this->dbcon->ErrorMsg(), $sql));
return false;
}
示例4: set
function set($field)
{
return parent::set($field);
}