FileAsset
class FileAsset implements Asset
Represents an asset backed by a local file.
Supports getting dimensions of images and duration of audio files.
Methods
No description
Returns the publicly accessible URL.
Returns the absolute filesystem path to the source file.
Allows direct echoing of the object to get the URL.
Returns the width in pixels for image files.
Returns the height in pixels for image files.
Returns the estimated duration in seconds for an MP3 audio file (assumes CBR).
Details
at line 20
__construct(string $url, string $path)
No description
at line 30
string
getUrl()
Returns the publicly accessible URL.
at line 39
string
getPath()
Returns the absolute filesystem path to the source file.
at line 48
string
__toString()
Allows direct echoing of the object to get the URL.
at line 58
int
getWidth()
Returns the width in pixels for image files.
at line 68
int
getHeight()
Returns the height in pixels for image files.
at line 93
float
getDuration()
Returns the estimated duration in seconds for an MP3 audio file (assumes CBR).