@@ -25,55 +25,55 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class Api |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * @var EndpointsContainer |
|
| 30 | - */ |
|
| 31 | - protected $endpointsContainer; |
|
| 28 | + /** |
|
| 29 | + * @var EndpointsContainer |
|
| 30 | + */ |
|
| 31 | + protected $endpointsContainer; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var string |
|
| 35 | - */ |
|
| 36 | - protected $organizationId; |
|
| 33 | + /** |
|
| 34 | + * @var string |
|
| 35 | + */ |
|
| 36 | + protected $organizationId; |
|
| 37 | 37 | |
| 38 | - public function __construct(EndpointsContainer $endpointsContainer) |
|
| 39 | - { |
|
| 40 | - $this->endpointsContainer = $endpointsContainer; |
|
| 41 | - } |
|
| 38 | + public function __construct(EndpointsContainer $endpointsContainer) |
|
| 39 | + { |
|
| 40 | + $this->endpointsContainer = $endpointsContainer; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Magic method to access different endpoints. |
|
| 45 | - * |
|
| 46 | - * @param string $endpoint |
|
| 47 | - * |
|
| 48 | - * @return Endpoint |
|
| 49 | - */ |
|
| 50 | - public function __get($endpoint) |
|
| 51 | - { |
|
| 52 | - $endpoint = $this->endpointsContainer->resolveEndpoint($endpoint); |
|
| 43 | + /** |
|
| 44 | + * Magic method to access different endpoints. |
|
| 45 | + * |
|
| 46 | + * @param string $endpoint |
|
| 47 | + * |
|
| 48 | + * @return Endpoint |
|
| 49 | + */ |
|
| 50 | + public function __get($endpoint) |
|
| 51 | + { |
|
| 52 | + $endpoint = $this->endpointsContainer->resolveEndpoint($endpoint); |
|
| 53 | 53 | |
| 54 | - if (method_exists($endpoint, 'setOrganizationId')) { |
|
| 55 | - $endpoint->setOrganizationId($this->organizationId); |
|
| 56 | - } |
|
| 54 | + if (method_exists($endpoint, 'setOrganizationId')) { |
|
| 55 | + $endpoint->setOrganizationId($this->organizationId); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - return $endpoint; |
|
| 59 | - } |
|
| 58 | + return $endpoint; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @param int $organizationId |
|
| 63 | - * @return $this |
|
| 64 | - */ |
|
| 65 | - public function setOrganization($organizationId) |
|
| 66 | - { |
|
| 67 | - $this->organizationId = $organizationId; |
|
| 61 | + /** |
|
| 62 | + * @param int $organizationId |
|
| 63 | + * @return $this |
|
| 64 | + */ |
|
| 65 | + public function setOrganization($organizationId) |
|
| 66 | + { |
|
| 67 | + $this->organizationId = $organizationId; |
|
| 68 | 68 | |
| 69 | - return $this; |
|
| 70 | - } |
|
| 69 | + return $this; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * @return string |
|
| 74 | - */ |
|
| 75 | - public function getOrganizationId() |
|
| 76 | - { |
|
| 77 | - return $this->organizationId; |
|
| 78 | - } |
|
| 72 | + /** |
|
| 73 | + * @return string |
|
| 74 | + */ |
|
| 75 | + public function getOrganizationId() |
|
| 76 | + { |
|
| 77 | + return $this->organizationId; |
|
| 78 | + } |
|
| 79 | 79 | } |
| 80 | 80 | \ No newline at end of file |