TableStrokeStyle
in package
implements
JsonSerializable
FinalYes
Stroke style for table borders and dividers.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $color : string|null
- The stroke color.
- $style : string|null
- The stroke style.
- $width : int|null
- The stroke width in points.
Methods
- dashed() : self
- Create a dashed stroke.
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setColor() : $this
- Set the stroke color.
- setStyle() : $this
- Set the stroke style.
- setWidth() : $this
- Set the stroke width.
- solid() : self
- Create a solid stroke.
Properties
$color
The stroke color.
private
string|null
$color
= null
$style
The stroke style.
private
string|null
$style
= null
$width
The stroke width in points.
private
int|null
$width
= null
Methods
dashed()
Create a dashed stroke.
public
static dashed(string $color[, int $width = 1 ]) : self
Parameters
- $color : string
-
The stroke color.
- $width : int = 1
-
The stroke width.
Return values
self —A new instance.
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>setColor()
Set the stroke color.
public
setColor(string $color) : $this
Parameters
- $color : string
-
The color in hex format.
Return values
$thissetStyle()
Set the stroke style.
public
setStyle(string $style) : $this
Parameters
- $style : string
-
One of 'solid', 'dashed', 'dotted'.
Return values
$thissetWidth()
Set the stroke width.
public
setWidth(int $width) : $this
Parameters
- $width : int
-
The width in points.
Return values
$thissolid()
Create a solid stroke.
public
static solid(string $color[, int $width = 1 ]) : self
Parameters
- $color : string
-
The stroke color.
- $width : int = 1
-
The stroke width.
Return values
self —A new instance.