本文整理汇总了PHP中test::show方法的典型用法代码示例。如果您正苦于以下问题:PHP test::show方法的具体用法?PHP test::show怎么用?PHP test::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test
的用法示例。
在下文中一共展示了test::show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public function show($GET, $POST)
{
$param = array();
$param['thepage'] = $GET['p'];
$param['page'] = isset($POST['pageNum']) ? $POST['pageNum'] : 1;
$param['PerPage'] = isset($POST['numPerPage']) ? $POST['numPerPage'] : 20;
if (!isset($GET['type'])) {
$GET['type'] = 0;
}
if (!isset($POST['keyword'])) {
$POST['keyword'] = "";
}
$param['keyword'] = $POST['keyword'];
$arr = array();
$param['rc'] = 0;
switch ($GET['p']) {
case 'test':
$test = new test();
$arr = $test->show($param['keyword'], $param['page'], $param['PerPage']);
$param['rc'] = $test->getNumByKeyword($param['keyword']);
break;
case 'user':
$user = new user();
$arr = $user->show($param['keyword'], $param['page'], $param['PerPage']);
$param['rc'] = $user->getNumByKeyword($param['keyword']);
break;
default:
$this->common($GET['p'], $param, $param['keyword'], $param['page'], $param['PerPage']);
break;
}
$this->smarty->assign("arr", $arr);
$this->smarty->assign("param", $param);
$this->smarty->display("view_html/" . $GET['p'] . ".html");
}
示例2: __clone
public $a = 'base';
// disallow cloning
private function __clone()
{
}
}
class test extends base
{
public $b = 'test';
// reenable cloning
public function __clone()
{
}
public function show()
{
__var_dump($this);
}
}
echo "Original\n";
$o1 = new test();
$o1->a = array(1, 2);
$o1->b = array(3, 4);
$o1->show();
echo "Clone\n";
$o2 = clone $o1;
$o2->show();
echo "Modify\n";
$o2->a = 5;
$o2->b = 6;
$o2->show();
echo "Done\n";