\BinContainerPackingItem

A class representative of a single item to put into the @see Bin.

Summary

Methods
Properties
Constants
__construct()
getId()
getLength()
getHeight()
getBreadth()
getVolume()
getWeight()
getRotationType()
getPosition()
getDimension()
setPrecision()
setRotationType()
setPosition()
jsonSerialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$id
$length
$breadth
$height
$volume
$weight
$rotationType
$position
N/A

Properties

$id

$id : mixed

Type

mixed — The item's id.

$length

$length : float

Type

float — The item's length.

$breadth

$breadth : float

Type

float — The item's breadth.

$height

$height : float

Type

float — The item's height.

$volume

$volume : float

Type

float — The item's volume.

$weight

$weight : float

Type

float — The item's weight.

$rotationType

$rotationType : int

Type

int — The item's current rotation type.

$position

$position : array

Type

array — The item's current position.

Methods

__construct()

__construct(mixed  $id, float  $length, float  $height, float  $breadth, float  $weight) : mixed

Parameters

mixed $id

The identifier of the item.

float $length

The length of the item.

float $height

The height of the item.

float $breadth

The breadth of the item.

float $weight

The weight of the item.

Returns

mixed —

getId()

getId() : mixed

The item's id getter.

Returns

mixed —

The item's id.

getLength()

getLength() : float

The item's length getter.

Returns

float —

The item's length.

getHeight()

getHeight() : float

The item's height getter.

Returns

float —

The item's height.

getBreadth()

getBreadth() : float

The item's breadth getter.

Returns

float —

The item's breadth.

getVolume()

getVolume() : float

The item's volume getter.

Returns

float —

The item's volume.

getWeight()

getWeight() : float

The item's weight getter.

Returns

float —

The item's weight.

getRotationType()

getRotationType() : int

The item's rotation type getter.

Returns

int —

The item's rotation type.

getPosition()

getPosition() : array

The item's position type getter.

In this case, it would return an array of 3 values representations of the x-axis, y-axis and z-axis (3d plane).

Returns

array —

The item's position (for example = ['x-axis => 0, 'y-axis' => 0, 'z-axis' => 0]).

getDimension()

getDimension() : array

Get the item's dimension based on the rotation type.

In this case, it would return an array of 3 values representations of the x-axis, y-axis and z-axis (3d plane).

Returns

array —

The item's dimension (for example = ['x-axis => 0, 'y-axis' => 0, 'z-axis' => 0]).

setPrecision()

setPrecision(mixed  $precision) : void

Set the number of digits after the decimal point of item's values.

Parameters

mixed $precision

The number of digits after the decimal point.

setRotationType()

setRotationType(int  $rotationType) : void

The item's rotation type setter.

The parameter value should be in range between 0 and 5.

Parameters

int $rotationType

The item's rotation type, @see RotationCombinationType for the rotation type list.

setPosition()

setPosition(array  $position) : void

The item's position setter.

The parameter value should be an array consisting of 3 values representing the x-axis, y-axis and z-axis.

Parameters

array $position

The item's position.

jsonSerialize()

jsonSerialize() : array

The json serialize method.

Returns

array —

The resulted object.