Apple News API PHP Client

RepeatableImageFill
in package
implements FillInterface

FinalYes

Tiled/repeatable image background fill.

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

Table of Contents

Interfaces

FillInterface
Interface for all fill types.

Constants

REPEAT_BOTH  = 'both'
Valid repeat modes.
REPEAT_NONE  = 'none'
REPEAT_X  = 'x'
REPEAT_Y  = 'y'

Properties

$height  : int|null
The height of each tile.
$repeat  : string|null
The repeat mode.
$url  : string
$width  : int|null
The width of each tile.

Methods

__construct()  : mixed
Create a new RepeatableImageFill.
fromBundle()  : self
Create a RepeatableImageFill from a bundle file.
fromUrl()  : self
Create a RepeatableImageFill from a URL.
getType()  : string
Get the fill type identifier.
jsonSerialize()  : array<string, mixed>
{@inheritdoc}
repeatBoth()  : $this
Set to repeat in both directions.
repeatX()  : $this
Set to repeat horizontally only.
repeatY()  : $this
Set to repeat vertically only.
setHeight()  : $this
Set the tile height.
setRepeat()  : $this
Set the repeat mode.
setSize()  : $this
Set the tile size.
setWidth()  : $this
Set the tile width.

Constants

Properties

Methods

__construct()

Create a new RepeatableImageFill.

public __construct(string $url) : mixed
Parameters
$url : string

The image URL.

fromBundle()

Create a RepeatableImageFill from a bundle file.

public static fromBundle(string $filename) : self
Parameters
$filename : string

The filename in the bundle.

Return values
self —

A new instance.

fromUrl()

Create a RepeatableImageFill from a URL.

public static fromUrl(string $url) : self
Parameters
$url : string

The image URL.

Return values
self —

A new instance.

getType()

Get the fill type identifier.

public getType() : string
Return values
string —

The fill type.

jsonSerialize()

{@inheritdoc}

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

repeatBoth()

Set to repeat in both directions.

public repeatBoth() : $this
Return values
$this

repeatX()

Set to repeat horizontally only.

public repeatX() : $this
Return values
$this

repeatY()

Set to repeat vertically only.

public repeatY() : $this
Return values
$this

setHeight()

Set the tile height.

public setHeight(int $height) : $this
Parameters
$height : int

The height in points.

Return values
$this

setRepeat()

Set the repeat mode.

public setRepeat(string $repeat) : $this
Parameters
$repeat : string

One of 'both', 'x', 'y', 'none'.

Return values
$this

setSize()

Set the tile size.

public setSize(int $width, int $height) : $this
Parameters
$width : int

The width in points.

$height : int

The height in points.

Return values
$this

setWidth()

Set the tile width.

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

The width in points.

Return values
$this

        
On this page

Search results