FtpFile
in package
Value object of a file in the uploads directory. `path` is always relative to the root (`uploads/`); the real server path never leaves the application. Downloads go only through the proxy endpoint by `path`, never by a direct link to the disk.
Table of Contents
Properties
- $contentType : string|null
- $extension : string
- $name : string
- $path : string
- $size : int
Methods
- __construct() : mixed
- getContentType() : string|null
- getExtension() : string
- getName() : string
- getPath() : string
- Path of the file relative to the uploads root (e.g. `photos/cat.jpg`).
- getSize() : int
- setContentType() : $this
- setExtension() : $this
- setName() : $this
- setPath() : $this
- setSize() : $this
Properties
$contentType
private
string|null
$contentType
= null
$extension
private
string
$extension
= ''
$name
private
string
$name
= ''
$path
private
string
$path
= ''
$size
private
int
$size
= 0
Methods
__construct()
public
__construct([string $name = '' ][, string $path = '' ][, string $extension = '' ][, int $size = 0 ][, string|null $contentType = null ]) : mixed
Parameters
- $name : string = ''
- $path : string = ''
- $extension : string = ''
- $size : int = 0
- $contentType : string|null = null
getContentType()
public
getContentType() : string|null
Return values
string|nullgetExtension()
public
getExtension() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetPath()
Path of the file relative to the uploads root (e.g. `photos/cat.jpg`).
public
getPath() : string
Return values
stringgetSize()
public
getSize() : int
Return values
intsetContentType()
public
setContentType(string|null $contentType) : $this
Parameters
- $contentType : string|null
Return values
$thissetExtension()
public
setExtension(string $extension) : $this
Parameters
- $extension : string
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetPath()
public
setPath(string $path) : $this
Parameters
- $path : string
Return values
$thissetSize()
public
setSize(int $size) : $this
Parameters
- $size : int