public __construct ( string $name ) | ||
$name | string |
public function __construct($name)
{
$argv = func_get_args();
$argc = count($argv);
$this->name = $name;
switch ($argc) {
case 4:
$this->ns = $argv[1];
$this->attrs = $argv[2];
$this->text = $argv[3];
break;
case 3:
if (is_array($argv[1])) {
$this->attrs = $argv[1];
$this->text = $argv[2];
} else {
$this->ns = $argv[1];
if (is_array($argv[2])) {
$this->attrs = $argv[2];
} else {
$this->text = $argv[2];
}
}
break;
case 2:
if (is_array($argv[1])) {
$this->attrs = $argv[1];
} else {
$this->ns = $argv[1];
}
break;
default:
break;
}
$this->rover =& $this;
}