Completed
Push — master ( 49b16a...bbcd37 )
by Sergey
13:21
created

Client::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
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
}