Documentation

Media
in package

Media collection.

Table of Contents

Properties

$elements  : array<string|int, mixed>
Media elements.

Methods

addElement()  : int
Add new media element.
countElements()  : int
Get media elements count.
getElements()  : array<string|int, mixed>
Get media elements.
resetElements()  : void
Reset media elements.
getElementsByType()  : array<string|int, mixed>
Get elements by media type.

Properties

$elements

Media elements.

private static array<string|int, mixed> $elements = []

Methods

addElement()

Add new media element.

public static addElement(string $container, string $mediaType, string $source[, Image|null $image = null ]) : int
Parameters
$container : string

section|headerx|footerx|footnote|endnote

$mediaType : string

image|object|link

$source : string
$image : Image|null = null
Tags
since
0.10.0
since
0.9.2
Return values
int

countElements()

Get media elements count.

public static countElements(string $container[, string $mediaType = null ]) : int
Parameters
$container : string

section|headerx|footerx|footnote|endnote

$mediaType : string = null

image|object|link

Tags
since
0.10.0
Return values
int

getElements()

Get media elements.

public static getElements(string $container[, string $type = null ]) : array<string|int, mixed>
Parameters
$container : string

section|headerx|footerx|footnote|endnote

$type : string = null

image|object|link

Tags
since
0.10.0
Return values
array<string|int, mixed>

resetElements()

Reset media elements.

public static resetElements() : void

getElementsByType()

Get elements by media type.

private static getElementsByType(string $container[, string $type = null ]) : array<string|int, mixed>
Parameters
$container : string

section|footnote|endnote

$type : string = null

image|object|link

Tags
since
0.11.0

Splitted from getElements to reduce complexity

Return values
array<string|int, mixed>

        
On this page

Search results