]> git.mxchange.org Git - friendica.git/blob - src/Network/Curl.php
Merge pull request #5862 from nupplaphil/rename_App_Methods
[friendica.git] / src / Network / Curl.php
1 <?php
2
3 namespace Friendica\Network;
4
5
6 /**
7  * A content class for Curl call results
8  */
9 class Curl
10 {
11         /**
12          * @var string the Code of the Curl call
13          */
14         private $code;
15
16         /**
17          * @var string the content type of the Curl call
18          */
19         private $contentType;
20
21         /**
22          * @var string the headers of the Curl call
23          */
24         private $headers;
25
26         public function __construct($code = '', $contentType = '', $headers = '')
27         {
28                 $this->code = $code;
29                 $this->contentType = $contentType;
30                 $this->headers = $headers;
31         }
32
33         /**
34          * Sets the Curl Code
35          *
36          * @param string $code The Curl Code
37          */
38         public function setCode($code)
39         {
40                 $this->code = $code;
41         }
42
43         /**
44          * Gets the Curl Code
45          *
46          * @return string The Curl Code
47          */
48         public function getCode()
49         {
50                 return $this->code;
51         }
52
53         /**
54          * Sets the Curl Content Type
55          *
56          * @param string $content_type The Curl Content Type
57          */
58         public function setContentType($content_type)
59         {
60                 $this->contentType = $content_type;
61         }
62
63         /**
64          * Returns the Curl Content Type
65          *
66          * @return string the Curl Content Type
67          */
68         public function getContentType()
69         {
70                 return $this->contentType;
71         }
72
73         /**
74          * Sets the Curl headers
75          *
76          * @param string $headers the Curl headers
77          */
78         public function setHeaders($headers)
79         {
80                 $this->headers = $headers;
81         }
82
83         /**
84          * Returns the Curl headers
85          *
86          * @return string the Curl headers
87          */
88         public function getHeaders()
89         {
90                 return $this->headers;
91         }
92 }