Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4107779
InputFileFromUrl.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
InputFileFromUrl.php
View Options
<?php
namespace
Shellbox\Command
;
use
Psr\Http\Message\UriInterface
;
/**
* @since 4.1.0
*/
class
InputFileFromUrl
extends
InputFile
{
/**
* @var UriInterface|string
*/
private
$url
;
/**
* @var array
*/
private
$headers
=
[];
/**
* @internal
* @param UriInterface|string $url
*/
public
function
__construct
(
$url
)
{
$this
->
url
=
$url
;
}
/**
* Replace the current array of headers with the specified list. The array
* should be in Guzzle's format: an associative array where the key is the
* header name and the value is either a string or an array of strings.
* Array values are used to send multiple headers with the same name.
*
* @param array $headers
* @return $this
*/
public
function
headers
(
array
$headers
)
{
$this
->
headers
=
$headers
;
return
$this
;
}
public
function
getClientData
()
{
return
[
'type'
=>
'url'
,
'url'
=>
(
string
)
$this
->
url
,
'headers'
=>
$this
->
headers
];
}
/**
* @return UriInterface|string
*/
public
function
getUrl
()
{
return
$this
->
url
;
}
/**
* @return array
*/
public
function
getHeaders
()
{
return
$this
->
headers
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 20:12 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3c/bb/fcf5090a9cd1d164a5df3aae1e46
Default Alt Text
InputFileFromUrl.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment