|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace seregazhuk\HeadHunterApi; |
|
4
|
|
|
|
|
5
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Me; |
|
6
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Regions; |
|
7
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Resumes; |
|
8
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Comments; |
|
9
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Artifacts; |
|
10
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Vacancies; |
|
11
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Employers; |
|
12
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Industries; |
|
13
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Negotiations; |
|
14
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\SavedSearches; |
|
15
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\Specializations; |
|
16
|
|
|
use seregazhuk\HeadHunterApi\EndPoints\EndpointsContainer; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Class Api |
|
20
|
|
|
* @property Vacancies $vacancies |
|
21
|
|
|
* @property Employers $employers |
|
22
|
|
|
* @property Regions $regions |
|
23
|
|
|
* @property Specializations $specializations |
|
24
|
|
|
* @property Industries $industries |
|
25
|
|
|
* @property Me $me |
|
26
|
|
|
* @property Resumes $resumes |
|
27
|
|
|
* @property Artifacts $artifacts |
|
28
|
|
|
* @property Negotiations $negotiations |
|
29
|
|
|
* @property SavedSearches $savedSearches |
|
30
|
|
|
* @property Comments $comments |
|
31
|
|
|
*/ |
|
32
|
|
|
class Client { |
|
33
|
|
|
|
|
34
|
|
|
private $endpointsContainer; |
|
35
|
|
|
|
|
36
|
|
|
public function __construct(EndpointsContainer $endpointsContainer) |
|
37
|
|
|
{ |
|
38
|
|
|
$this->endpointsContainer = $endpointsContainer; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
public function __get($endpoint) |
|
42
|
|
|
{ |
|
43
|
|
|
return $this->endpointsContainer->getEndpoint($endpoint); |
|
44
|
|
|
} |
|
45
|
|
|
} |