-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcard.php
More file actions
66 lines (58 loc) · 1.24 KB
/
card.php
File metadata and controls
66 lines (58 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
// Card object
include_once('sleeve.php');
class card {
var $id = NULL;
var $nb_of_cards = 0;
var $height = 0;
var $width = 0;
var $sleeves = array();
var $card_nb = NULL;
function __construct($nb_of_cards, $sleeve_arr = NULL, $id = NULL, $card_nb = NULL, $width = NULL, $height = NULL) {
$this->id = $id;
$this->nb_of_cards = $nb_of_cards;
$this->sleeves = $sleeve_arr;
$this->height = $height;
$this->width = $width;
$this->card_nb = $card_nb;
}
// Setters
function set_id($id) {
$this->id = $id;
}
function set_nb_cards($nb_of_cards) {
$this->nb_of_cards = $nb_of_cards;
}
function set_height($height) {
$this->height = $height;
}
function set_width($width) {
$this->width = $width;
}
function add_sleeve($sleeve){
$this->$sleeves[] = $sleeve;
}
function add_card_nb($card_nb){
$this->card_nb = $card_nb;
}
// Getters
function get_id() {
return $this->id;
}
function get_nb_cards() {
return $this->nb_of_cards;
}
function get_height() {
return $this->height;
}
function get_width() {
return $this->width;
}
function get_sleeves(){
return $this->sleeves;
}
function get_card_nb(){
return $this->card_nb;
}
}
?>