Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Transfer.php
Go to the documentation of this file.
1 <?php
7 
11 class Transfer implements TransferInterface
12 {
16  const AUTH_USERNAME = 'username';
17 
21  const AUTH_PASSWORD = 'password';
22 
26  private $clientConfig;
27 
31  private $headers;
32 
36  private $method;
37 
41  private $body;
42 
46  private $uri;
47 
51  private $encode;
52 
56  private $auth;
57 
67  public function __construct(
68  array $clientConfig,
69  array $headers,
70  $body,
71  array $auth,
72  $method,
73  $uri,
74  $encode
75  ) {
76  $this->clientConfig = $clientConfig;
77  $this->headers = $headers;
78  $this->body = $body;
79  $this->auth = $auth;
80  $this->method = $method;
81  $this->uri = $uri;
82  $this->encode = $encode;
83  }
84 
90  public function getClientConfig()
91  {
92  return $this->clientConfig;
93  }
94 
100  public function getMethod()
101  {
102  return (string)$this->method;
103  }
104 
110  public function getHeaders()
111  {
112  return $this->headers;
113  }
114 
120  public function getBody()
121  {
122  return $this->body;
123  }
124 
130  public function getUri()
131  {
132  return (string)$this->uri;
133  }
134 
138  public function shouldEncode()
139  {
140  return $this->encode;
141  }
142 
148  public function getAuthUsername()
149  {
150  return $this->auth[self::AUTH_USERNAME];
151  }
152 
158  public function getAuthPassword()
159  {
160  return $this->auth[self::AUTH_PASSWORD];
161  }
162 }
__construct(array $clientConfig, array $headers, $body, array $auth, $method, $uri, $encode)
Definition: Transfer.php:67