MediaFileTrait
Trait MediaFileTrait
Table of Contents
Methods
- exists() : bool
- Check if this medium exists or not
- modified() : int|null
- Get file modification time for the medium.
- path() : string
- Return PATH to file.
- relativePath() : string
- Return the relative path to file
- reset() : $this
- Reset medium.
- size() : int
- Get size of the medium.
- url() : string
- Return URL to file.
- urlQuerystring() : string
- Get the URL with full querystring
- getGrav() : Grav
Methods
exists()
Check if this medium exists or not
public
exists() : bool
Return values
boolmodified()
Get file modification time for the medium.
public
modified() : int|null
Return values
int|nullpath()
Return PATH to file.
public
path([bool $reset = true ]) : string
Parameters
- $reset : bool = true
Return values
string —path to file
relativePath()
Return the relative path to file
public
relativePath([bool $reset = true ]) : string
Parameters
- $reset : bool = true
Return values
stringreset()
Reset medium.
public
abstract reset() : $this
Return values
$thissize()
Get size of the medium.
public
size() : int
Return values
inturl()
Return URL to file.
public
url([bool $reset = true ]) : string
Parameters
- $reset : bool = true
Return values
stringurlQuerystring()
Get the URL with full querystring
public
abstract urlQuerystring(string $url) : string
Parameters
- $url : string
Return values
stringgetGrav()
protected
abstract getGrav() : Grav