本文整理汇总了PHP中Test::put方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::put方法的具体用法?PHP Test::put怎么用?PHP Test::put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test
的用法示例。
在下文中一共展示了Test::put方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Test
function add_test($name)
{
$test = new Test();
$test->name = $name;
$test->design_file = 'stupid_design.php';
$test->handler_file = 'random_order.php';
$test->finisher_file = 'sms_points_printer.php';
$test->sms_enabled = 1;
$test->put();
$test->all_questions = array();
return $test;
}
示例2: Test
<?php
include '../lib/common.inc.php';
$test = new Test();
$test->name = trim($_REQUEST['name']);
// validate
$test->put();
jsdie('testCreated', $test->id);
示例3: put
{
public function put($p)
{
$ret['s'] = 'OK';
$t = new CassandraCF('mall', 'UserItem', true);
// if(is_array($p)){
$id = $p['u'];
$ret['id'] = $t->put_super($p['d'], $id);
return $ret;
}
public function get($p)
{
$ret['s'] = 'OK';
$t = new CassandraCF('mall', 'UserItem', true);
$id = $p['u'];
$ret['d'] = $t->get($id);
return $ret;
}
}
//return;
$p = array('u' => '2', 'd' => array('id' => 'testid', 'first' => 'Zeng', 'last' => 'tingkun', 'addr' => array('city' => 'beijing', 'zip' => '123456')));
print_r($p);
$t = new Test();
record_time($start);
print_r($t->put($p));
record_time($start, '$t->put($p)');
$p['d']['id'] = '';
$p['d']['info'] = 'with no id';
print_r($t->put($p));
print_r($t->get($p));
record_time($start, '$t->get($p)');