Documentation

Media

Media collection

Table of Contents

$elements  : array<string|int, mixed>
Media elements
addElement()  : int
Add new media element
addFooterMediaElement()  : int
Add new Footer Media Element
addHeaderMediaElement()  : int
Add new Header Media Element
addSectionLinkElement()  : int
Add new Section Link Element
addSectionMediaElement()  : int
Add new Section Media Element
countElements()  : int
Get media elements count
countFooterMediaElements()  : int
Get Footer Media Elements Count
countHeaderMediaElements()  : int
Get Header Media Elements Count
countSectionMediaElements()  : int
Get Section Media Elements Count
getElements()  : array<string|int, mixed>
Get media elements
getFooterMediaElements()  : array<string|int, mixed>
Get Footer Media Elements
getHeaderMediaElements()  : array<string|int, mixed>
Get Header Media Elements
getSectionMediaElements()  : array<string|int, mixed>
Get Section Media Elements
resetElements()  : mixed
Reset media elements
getElementsByType()  : array<string|int, mixed>
Get elements by media type

Properties

$elements

Media elements

private static array<string|int, mixed> $elements = array()

Methods

addElement()

Add new media element

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

section|headerx|footerx|footnote|endnote

$mediaType : string

image|object|link

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

addFooterMediaElement()

Add new Footer Media Element

public static addFooterMediaElement(int $footerCount, string $src[, Image $image = null ]) : int
Parameters
$footerCount : int
$src : string
$image : Image = null
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
int

addHeaderMediaElement()

Add new Header Media Element

public static addHeaderMediaElement(int $headerCount, string $src[, Image $image = null ]) : int
Parameters
$headerCount : int
$src : string
$image : Image = null
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
int

addSectionLinkElement()

Add new Section Link Element

public static addSectionLinkElement(string $linkSrc) : int
Parameters
$linkSrc : string
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
int

addSectionMediaElement()

Add new Section Media Element

public static addSectionMediaElement(string $src, string $type[, Image $image = null ]) : int
Parameters
$src : string
$type : string
$image : Image = null
Tags
deprecated
0.10.0
codeCoverageIgnore
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

countFooterMediaElements()

Get Footer Media Elements Count

public static countFooterMediaElements(string $key) : int
Parameters
$key : string
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
int

countHeaderMediaElements()

Get Header Media Elements Count

public static countHeaderMediaElements(string $key) : int
Parameters
$key : string
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
int

countSectionMediaElements()

Get Section Media Elements Count

public static countSectionMediaElements([string $key = null ]) : int
Parameters
$key : string = null
Tags
deprecated
0.10.0
codeCoverageIgnore
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>

getFooterMediaElements()

Get Footer Media Elements

public static getFooterMediaElements() : array<string|int, mixed>
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
array<string|int, mixed>

getHeaderMediaElements()

Get Header Media Elements

public static getHeaderMediaElements() : array<string|int, mixed>
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
array<string|int, mixed>

getSectionMediaElements()

Get Section Media Elements

public static getSectionMediaElements([string $key = null ]) : array<string|int, mixed>
Parameters
$key : string = null
Tags
deprecated
0.10.0
codeCoverageIgnore
Return values
array<string|int, mixed>

resetElements()

Reset media elements

public static resetElements() : mixed
Return values
mixed

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>

Search results