/** * Создает экземпляр клиента для работы с Masterfolio Api. * * @param Config $config */ public function __construct(Config $config) { $this->apiKey = $config->getApiKey(); $response = $this->send('auth', ['email' => $config->getEmail(), 'password' => $config->getPassword()]); $this->token = current($response->xpath('//token'))->__toString(); }