Apple News API PHP Client

TextStrokeStyle
in package
implements JsonSerializable

FinalYes

Text outline/stroke styling.

Tags
see
https://developer.apple.com/documentation/apple_news/textstrokestyle

Table of Contents

Interfaces

JsonSerializable

Properties

$color  : string|null
The stroke color.
$width  : int|null
The stroke width.

Methods

create()  : self
Create a text stroke.
jsonSerialize()  : array<string, mixed>
{@inheritdoc}
setColor()  : $this
Set the stroke color.
setWidth()  : $this
Set the stroke width.

Properties

Methods

create()

Create a text stroke.

public static create(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
$this

setWidth()

Set the stroke width.

public setWidth(int $width) : $this
Parameters
$width : int

The width in points.

Return values
$this

        
On this page

Search results