Card.php 384 B

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