Documentation

Size
in package

Represents a size.

This class encapsulates width and height dimensions.

Table of Contents

Properties

$attributes  : string
$height  : int
The height.
$isNull  : bool
$params  : string
$style  : string
$width  : int
The width.

Methods

__construct()  : mixed
Constructs a new Size instance.
__get()  : mixed
Magic getter method.
Expand()  : void
Expands the size.
TransformTo()  : Size
Transforms the size.
TransformToFill()  : Size
Transforms the size to fill a given area.

Properties

$attributes read-only

public string $attributes

Get text as attributes.

$height

The height.

public int $height

$isNull read-only

public bool $isNull

Check if the size is null.

$params read-only

public string $params

Get text as query parameters.

$style read-only

public string $style

Get text for the style attribute.

$width

The width.

public int $width

Methods

__construct()

Constructs a new Size instance.

public __construct([int $width = 0 ][, int $height = 0 ]) : mixed
Parameters
$width : int = 0

The width.

$height : int = 0

The height.

__get()

Magic getter method.

public __get(string $nm) : mixed
Parameters
$nm : string

The property name.

Return values
mixed

The value of the property.

Expand()

Expands the size.

public Expand(int $w, int $h) : void
Parameters
$w : int

The width increment.

$h : int

The height increment.

TransformTo()

Transforms the size.

public TransformTo(Size $size) : Size
Parameters
$size : Size

The target size.

Return values
Size

The transformed size.

TransformToFill()

Transforms the size to fill a given area.

public TransformToFill(Size $size) : Size
Parameters
$size : Size

The target size.

Return values
Size

The transformed size.


        
On this page

Search results