FOSSology
4.4.0
Open Source License Compliance by Open Source Software
CurlRequest.php
Go to the documentation of this file.
1
<?php
2
# SPDX-FileCopyrightText: © Fossology contributors
3
4
# SPDX-License-Identifier: GPL-2.0-only
5
17
namespace
Fossology\Lib\Application
;
18
23
class
CurlRequest
24
{
29
private
$handle
=
null
;
30
35
public
function
__construct
($url)
36
{
37
$this->handle = curl_init($url);
38
}
39
44
public
function
setOptions
($options)
45
{
46
curl_setopt_array($this->handle, $options);
47
}
48
53
public
function
execute
()
54
{
55
return
curl_exec($this->handle);
56
}
57
63
public
function
getInfo
($resource)
64
{
65
return
curl_getinfo($this->handle, $resource);
66
}
67
71
public
function
close
()
72
{
73
curl_close($this->handle);
74
}
75
}
Fossology\Lib\Application\CurlRequest
Handle curl requests.
Definition:
CurlRequest.php:24
Fossology\Lib\Application\CurlRequest\setOptions
setOptions($options)
Definition:
CurlRequest.php:44
Fossology\Lib\Application\CurlRequest\close
close()
Definition:
CurlRequest.php:71
Fossology\Lib\Application\CurlRequest\execute
execute()
Definition:
CurlRequest.php:53
Fossology\Lib\Application\CurlRequest\getInfo
getInfo($resource)
Definition:
CurlRequest.php:63
Fossology\Lib\Application\CurlRequest\__construct
__construct($url)
Definition:
CurlRequest.php:35
Fossology\Lib\Application\CurlRequest\$handle
$handle
Definition:
CurlRequest.php:29
Fossology\Lib\Application
Utility functions for specific applications.
src
lib
php
Application
CurlRequest.php
Generated on Mon Nov 18 2024 07:37:13 for FOSSology by
1.9.1