1 <?php
2 /**
3 * Copyright 2015 Klarna AB
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * File containing the Klarna_Checkout_HTTP_CURLHeaders class
18 *
19 * PHP version 5.3
20 *
21 * @category Payment
22 * @package Payment_Klarna
23 * @subpackage HTTP
24 * @author Klarna <support@klarna.com>
25 * @copyright 2015 Klarna AB
26 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache license v2.0
27 * @link http://developers.klarna.com/
28 */
29
30 /**
31 * Defines a cURL handle interface
32 *
33 * @category Payment
34 * @package Payment_Klarna
35 * @subpackage HTTP
36 * @author David K. <david.keijser@klarna.com>
37 * @copyright 2015 Klarna AB
38 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache license v2.0
39 * @link http://developers.klarna.com/
40 */
41 interface Klarna_Checkout_HTTP_CURLHandleInterface
42 {
43 /**
44 * Set an option for the cURL transfer
45 *
46 * @param int $name option the set
47 * @param mixed $value the value to be set on option
48 *
49 * @return void
50 */
51 public function setOption($name, $value);
52
53 /**
54 * Perform the cURL session
55 *
56 * @return mixed response
57 */
58 public function execute();
59
60 /**
61 * Get information regarding this transfer
62 *
63 * @return array
64 */
65 public function getInfo();
66
67 /**
68 * Get error message regarding this transfer
69 *
70 * @return string Error message
71 */
72 public function getError();
73
74 /**
75 * Close the cURL session
76 *
77 * @return void
78 */
79 public function close();
80 }
81