| 1 | <?php |
||
| 5 | class Referral |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $source; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $type; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $adId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var null|string |
||
| 25 | */ |
||
| 26 | protected $ref; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Referral constructor. |
||
| 30 | * |
||
| 31 | * @param string $source |
||
| 32 | * @param string $type |
||
| 33 | * @param string $adId |
||
| 34 | */ |
||
| 35 | 2 | public function __construct(string $source, string $type, string $adId) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 1 | public function getSource(): string |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | 1 | public function getType(): string |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 1 | public function getAdId(): string |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @return null|string |
||
| 68 | */ |
||
| 69 | 1 | public function getRef() |
|
| 73 | |||
| 74 | /** |
||
| 75 | * @param string $ref |
||
| 76 | * @return \Kerox\Messenger\Model\Referral |
||
| 77 | */ |
||
| 78 | 2 | public function setRef(string $ref): Referral |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @param array $referral |
||
| 87 | * @return \Kerox\Messenger\Model\Referral |
||
| 88 | */ |
||
| 89 | 2 | public static function create(array $referral): Referral |
|
| 98 | } |
||
| 99 |