Methods |
public
|
__construct(
StreamInterface|resource|string|null $body,
?string $name = null,
?string $filename = null,
?string $mediaType = null,
?string $asciiFilename = null,
)
|
#
|
public
static
|
fromFile(
string $filename,
?string $name = null,
string|null $uploadFilename = null,
string|null $mediaType = null,
?string $asciiFilename = null,
): self
Get an instance backed by a local file
Get an instance backed by a local file
Parameters
$uploadFilename |
Default: basename($filename)
|
$mediaType |
Default: mime_content_type($filename) ,
application/octet-stream on failure.
|
|
#
|
public
|
getName(): string
Get the field name of the part
Get the field name of the part
Implements
|
#
|
public
|
getFilename(): ?string
Get the filename of the part
Get the filename of the part
Implements
|
#
|
public
|
getAsciiFilename(): ?string
Get the ASCII filename of the part
Get the ASCII filename of the part
Implements
|
#
|
public
|
getMediaType(): ?string
Get the media type of the part
Get the media type of the part
Implements
|
#
|
public
|
getBody(): StreamInterface
Get the body of the part
|
#
|
public
|
withName(string $name): StreamPartInterface
Get an instance with the given field name
Get an instance with the given field name
Implements
|
#
|