Card.php 373 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\api\controller;
  3. class Card
  4. {
  5. private $type;
  6. private $number;
  7. public function __construct($type, $num)
  8. {
  9. $this->type = $type;
  10. $this->number = $type + $num;
  11. }
  12. public function getType() {
  13. return $this->type;
  14. }
  15. public function getNumber() {
  16. return $this->number - $this->type;
  17. }
  18. }