Documentation

MediaObject
in package
implements MediaObjectInterface

Class MediaObject

Table of Contents

Interfaces

MediaObjectInterface
Media Object Interface

Properties

$media  : MediaObjectInterface|null
$object  : FlexObjectInterface
$placeholderImage  : string
$field  : string|null
$filename  : string

Methods

__construct()  : mixed
MediaObject constructor.
__debugInfo()  : array<string|int, string>
createResponse()  : Response
Create media response.
exists()  : bool
Returns true if the object exists.
get()  : mixed|null
getId()  : string
Get identifier's ID.
getMeta()  : array<string|int, mixed>
Get metadata associated to the media object.
getType()  : string
Get identifier's type.
getUrl()  : string
Return URL pointing to the media object.
jsonSerialize()  : array<string|int, mixed>
create404Response()  : Response
processMediaActions()  : MediaObjectInterface
Process media actions

Properties

$placeholderImage

public static string $placeholderImage = 'image://media/thumb.png'

Methods

__debugInfo()

public __debugInfo() : array<string|int, string>
Return values
array<string|int, string>

createResponse()

Create media response.

public createResponse(array<string|int, mixed> $actions) : Response
Parameters
$actions : array<string|int, mixed>
Return values
Response

exists()

Returns true if the object exists.

public exists() : bool
Return values
bool

get()

public get(string $field) : mixed|null
Parameters
$field : string
Return values
mixed|null

getId()

Get identifier's ID.

public getId() : string
Return values
string

getMeta()

Get metadata associated to the media object.

public getMeta() : array<string|int, mixed>
Return values
array<string|int, mixed>

getType()

Get identifier's type.

public getType() : string
Return values
string

getUrl()

Return URL pointing to the media object.

public getUrl() : string
Return values
string

jsonSerialize()

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

create404Response()

protected create404Response(array<string|int, mixed> $actions) : Response
Parameters
$actions : array<string|int, mixed>
Return values
Response

        
On this page

Search results