DVDoug\BoxPacker\Item::getWidth PHP Method

getWidth() public method

Item width in mm
public getWidth ( ) : integer
return integer
    public function getWidth();

Usage Example

Example #1
0
 /**
  * Figure out if we can stack the next item vertically on top of this rather than side by side
  * Used when we've packed a tall item, and have just put a shorter one next to it
  * @param Item $item
  * @param Item $nextItem
  * @param $maxStackDepth
  * @param $remainingWeight
  * @return bool
  */
 protected function canStackItemInLayer(Item $item, Item $nextItem, $maxStackDepth, $remainingWeight)
 {
     return $nextItem->getDepth() <= $maxStackDepth && $nextItem->getWeight() <= $remainingWeight && $nextItem->getWidth() <= $item->getWidth() && $nextItem->getLength() <= $item->getLength();
 }
All Usage Examples Of DVDoug\BoxPacker\Item::getWidth