You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
879 B

<?php
class CardAttributes {
public $color;
public $shape;
public $fill;
public $number;
public $border;
public $id;
/*
$num=func_num_args();
switch($num)
{
case 1:
//4 paramètres passés
$this->color=func_get_arg(0);
$this->shape=func_get_arg(1);
$this->fill=func_get_arg(2);
$this->number=func_get_arg(3);
$this->id=func_get_arg(4);
break;
case 2:
//5 paramètres passés
$this->color=func_get_arg(0);
$this->shape=func_get_arg(1);
$this->fill=func_get_arg(2);
$this->number=func_get_arg(3);
$this->id=func_get_arg(4);
$this->border=func_get_arg(5);
break;
default:
}
}*/
function __construct($color, $shape, $fill, $border, $number, $id) {
$this->color = $color;
$this->shape = $shape;
$this->fill = $fill;
$this->border = $border;
$this->number = $number;
$this->id = $id;
}
}