ImageVariable

Type
Class
Namespace
Craft
Inherits
Craft\ImageVariable
Since
1.0

Class ImageVariable

See also http://craftcms.com

View source

Protected Properties

PropertyDescription
$pathstring
$size
$urlstring

$path

Signature

protected string $path = null

$size

Signature

protected  $size = null

$url

Signature

protected string $url = null

Public Methods

MethodDescription
__construct()Constructor
getHeight()Returns the image's height.
getSize()Returns an array of the width and height of the image.
getUrl()Returns the image's URL.
getWidth()Returns the image's width.

__construct()

Constructor

View source

Arguments

Returns

Craft\ImageVariable

Signature

public Craft\ImageVariable __construct ( $path, $url = "" )

getHeight()

Returns the image's height.

View source

Returns

integer

Signature

public integer getHeight ( )

getSize()

Returns an array of the width and height of the image.

View source

Returns

array

Signature

public array getSize ( )

getUrl()

Returns the image's URL.

View source

Returns

string

Signature

public string getUrl ( )

getWidth()

Returns the image's width.

View source

Returns

integer

Signature

public integer getWidth ( )