| 1 | <?php |
||
| 14 | class Password |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $id; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | protected $ttl; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | protected $views; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $password; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Password constructor. |
||
| 38 | * @param string $id |
||
| 39 | * @param string $password |
||
| 40 | * @param int $ttl |
||
| 41 | * @param int $views |
||
| 42 | */ |
||
| 43 | 4 | public function __construct($id, $password, $ttl, $views) |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 1 | public function getId() |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | 1 | public function getPassword() |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @return int |
||
| 69 | */ |
||
| 70 | 1 | public function getTtl() |
|
| 74 | |||
| 75 | /** |
||
| 76 | * @return int |
||
| 77 | */ |
||
| 78 | 1 | public function getViews() |
|
| 82 | |||
| 83 | /** |
||
| 84 | */ |
||
| 85 | 2 | public function decreaseViews() |
|
| 93 | |||
| 94 | /** |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | public function getJson() |
||
| 107 | } |
||
| 108 |