- 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);
}
{
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