- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
// Конструктор
public function __construct($tablename,
$detal = "*",
$where,
$order = "",
$pnumber = 10,
$page_link = 3,
$parameters = "")
{
if (empty($detal)) $this->detal = '*'; else $this->detal = $detal;
parent::__construct($tablename,
$where,
$order,
$pnumber,
$page_link,
$parameters);
}
wvxvw 20.02.2012 19:30 # +4
Мартин 20.02.2012 21:17 # −1
AxisPod 21.02.2012 07:04 # −1
wvxvw 21.02.2012 11:54 # 0
zii 22.02.2012 13:06 # 0
zii 22.02.2012 13:08 # +1
{
public function __construct($foo, $bar='test', $var)
{
// do smth
}
}
$test = new Test(1);
На выходе получаем:
Warning: Missing argument 3 for Test::__construct(), called in C:\WebServers\home\localhost\www\tests\t est.php on line 11 and defined in C:\WebServers\home\localhost\www\tests\t est.php on line 5
englandpost 22.02.2012 13:09 # 0