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
Return values
intcountElements()
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
Return values
intgetElements()
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
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