Image
Acts as a pseudo model for holding all information of an avatar image Holds url + dimensions of avatar image
Table of Contents
Properties
- $height : int
- $url : string
- Url of avatar image. Needs to be relative to the website root or an absolute URL.
- $width : int
Methods
- __construct() : mixed
- getHeight() : int
- getUrl() : string
- Fetches the URL to the the avatar image
- getWidth() : int
Properties
$height
protected
int
$height
$url
Url of avatar image. Needs to be relative to the website root or an absolute URL.
protected
string
$url
$width
protected
int
$width
Methods
__construct()
public
__construct(string $url, int $width, int $height) : mixed
Parameters
- $url : string
-
url of image. Needs to be relative to the website root or an absolute URL.
- $width : int
-
width of image
- $height : int
-
height of image
getHeight()
public
getHeight() : int
Return values
intgetUrl()
Fetches the URL to the the avatar image
public
getUrl([bool $relativeToCurrentScript = false ]) : string
Parameters
- $relativeToCurrentScript : bool = false
-
Determines whether the URL returned should be relative to the current script, in case it is relative at all.
Return values
stringgetWidth()
public
getWidth() : int