Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. class MyDTO
  4. {
  5.     /**
  6.      * @var string Первый параметр
  7.      */
  8.     private $firstOption;
  9.  
  10.     /**
  11.      * @var int Это второй параметр
  12.      */
  13.     private $secondOption;
  14.  
  15.     /**
  16.      * MyDTO constructor.
  17.      * @param string $firstOption
  18.      * @param int $secondOption
  19.      */
  20.     public function __construct(string $firstOption, int $secondOption)
  21.     {
  22.         $this->firstOption = $firstOption;
  23.         $this->secondOption = $secondOption;
  24.     }
  25.  
  26.     /**
  27.      * @return string
  28.      */
  29.     public function getFirstOption(): string
  30.     {
  31.         return $this->firstOption;
  32.     }
  33.  
  34.     /**
  35.      * @return int
  36.      */
  37.     public function getSecondOption(): int
  38.     {
  39.         return $this->secondOption;
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement