Wrap
extends AbstractAlignment
in package
Pdf page text wrap class
Tags
Table of Contents
Constants
Properties
- $alignment : string
- Text alignment
- $box : array<string|int, mixed>
- Wrap box boundary
- $leading : int
- Text leading
- $leftX : int
- Left X boundary
- $rightX : int
- Right X boundary
Methods
- __construct() : mixed
- Constructor
- createLeft() : Wrap
- Create LEFT alignment object
- createRight() : Wrap
- Create RIGHT alignment object
- getAlignment() : string
- Get alignment
- getBox() : array<string|int, mixed>
- Get the wrap box boundary
- getLeading() : int
- Get the leading
- getLeftX() : int
- Get the left X
- getRightX() : int
- Get the right X
- getStrings() : array<string|int, mixed>
- Get strings
- hasLeading() : bool
- Has leading
- hasLeftX() : bool
- Has left X
- hasRightX() : bool
- Has right X
- isLeft() : bool
- Is LEFT alignment
- isRight() : bool
- Is RIGHT alignment
- setAlignment() : AbstractAlignment
- Set alignment
- setBox() : Wrap
- Set the wrap box boundary
- setBoxCoordinates() : Wrap
- Set the wrap box boundary by coordinates
- setLeading() : AbstractAlignment
- Set the leading
- setLeftX() : AbstractAlignment
- Set the left X boundary
- setRightX() : AbstractAlignment
- Set the right X boundary
Constants
LEFT
Alignment constants
public
mixed
LEFT
= 'LEFT'
RIGHT
public
mixed
RIGHT
= 'RIGHT'
Properties
$alignment
Text alignment
protected
string
$alignment
= self::LEFT
$box
Wrap box boundary
protected
array<string|int, mixed>
$box
= ['left' => 0, 'right' => 0, 'top' => 0, 'bottom' => 0]
$leading
Text leading
protected
int
$leading
= 0
$leftX
Left X boundary
protected
int
$leftX
= 0
$rightX
Right X boundary
protected
int
$rightX
= 0
Methods
__construct()
Constructor
public
__construct([string $alignment = self::LEFT ][, int $leftX = 0 ][, int $rightX = 0 ][, array<string|int, mixed> $box = [] ][, int $leading = 0 ]) : mixed
Instantiate a PDF text wrap object.
Parameters
- $alignment : string = self::LEFT
- $leftX : int = 0
- $rightX : int = 0
- $box : array<string|int, mixed> = []
- $leading : int = 0
createLeft()
Create LEFT alignment object
public
static createLeft([int $leftX = 0 ][, int $rightX = 0 ][, array<string|int, mixed> $box = [] ][, int $leading = 0 ]) : Wrap
Parameters
- $leftX : int = 0
- $rightX : int = 0
- $box : array<string|int, mixed> = []
- $leading : int = 0
Return values
WrapcreateRight()
Create RIGHT alignment object
public
static createRight([int $leftX = 0 ][, int $rightX = 0 ][, array<string|int, mixed> $box = [] ][, int $leading = 0 ]) : Wrap
Parameters
- $leftX : int = 0
- $rightX : int = 0
- $box : array<string|int, mixed> = []
- $leading : int = 0
Return values
WrapgetAlignment()
Get alignment
public
getAlignment() : string
Return values
stringgetBox()
Get the wrap box boundary
public
getBox() : array<string|int, mixed>
Return values
array<string|int, mixed>getLeading()
Get the leading
public
getLeading() : int
Return values
intgetLeftX()
Get the left X
public
getLeftX() : int
Return values
intgetRightX()
Get the right X
public
getRightX() : int
Return values
intgetStrings()
Get strings
public
getStrings(Text $text, Font $font, int $startY) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>hasLeading()
Has leading
public
hasLeading() : bool
Return values
boolhasLeftX()
Has left X
public
hasLeftX() : bool
Return values
boolhasRightX()
Has right X
public
hasRightX() : bool
Return values
boolisLeft()
Is LEFT alignment
public
isLeft() : bool
Return values
boolisRight()
Is RIGHT alignment
public
isRight() : bool
Return values
boolsetAlignment()
Set alignment
public
setAlignment(string $alignment) : AbstractAlignment
Parameters
- $alignment : string
Return values
AbstractAlignmentsetBox()
Set the wrap box boundary
public
setBox(array<string|int, mixed> $box) : Wrap
Parameters
- $box : array<string|int, mixed>
Tags
Return values
WrapsetBoxCoordinates()
Set the wrap box boundary by coordinates
public
setBoxCoordinates(int $left, int $right, int $top, int $bottom) : Wrap
Parameters
- $left : int
- $right : int
- $top : int
- $bottom : int
Return values
WrapsetLeading()
Set the leading
public
setLeading(int $leading) : AbstractAlignment
Parameters
- $leading : int
Return values
AbstractAlignmentsetLeftX()
Set the left X boundary
public
setLeftX(int $x) : AbstractAlignment
Parameters
- $x : int
Return values
AbstractAlignmentsetRightX()
Set the right X boundary
public
setRightX(int $x) : AbstractAlignment
Parameters
- $x : int