1 | <?php |
||
9 | class EmailFinder extends HunterClient |
||
10 | { |
||
11 | /** |
||
12 | * Domain name from which you want to find the email addresses |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | public $domain; |
||
17 | |||
18 | /** |
||
19 | * The company name from which you want to find the email addresses |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | public $company; |
||
24 | |||
25 | /** |
||
26 | * The person's full name |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | public $full_name; |
||
31 | |||
32 | /** |
||
33 | * The person's first name |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | public $first_name; |
||
38 | |||
39 | /** |
||
40 | * The person's last name |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | public $last_name; |
||
45 | |||
46 | public function __construct(string $api_key = null) |
||
52 | |||
53 | /** |
||
54 | * Sets domain to search |
||
55 | * |
||
56 | * @param string $domain |
||
57 | * @return EmailFinder |
||
58 | */ |
||
59 | public function domain(string $domain): self |
||
65 | |||
66 | /** |
||
67 | * Set company name to search |
||
68 | * |
||
69 | * @param string $company |
||
70 | * @return EmailFinder |
||
71 | */ |
||
72 | public function company(string $company): self |
||
78 | |||
79 | /** |
||
80 | * Set the person's name to search |
||
81 | * Sets `full_name` by passing in a single argument, or |
||
82 | * sets `first_name` and `last_name` when passing two arguments |
||
83 | * |
||
84 | * Note that you'll get better results by supplying the person's first and last name if you can. |
||
85 | * |
||
86 | * @param string $first_name |
||
87 | * @param string|null $last_name |
||
88 | * @return EmailFinder |
||
89 | */ |
||
90 | public function name(string $first_name, string $last_name = null): self |
||
104 | |||
105 | /** |
||
106 | * Build query with set attributes |
||
107 | * |
||
108 | * @return string |
||
109 | * @throws InvalidRequestException |
||
110 | */ |
||
111 | public function make() |
||
136 | } |
||
137 |