LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
Image Class Reference

Class to represent a content-item image object. More...

Inheritance diagram for Image:
ContentItemImage

Public Member Functions

 __construct ($url, $width=null, $height=null)
 Class constructor.
 
 toJsonldObject ()
 Generate the JSON-LD object representation of the image.
 
 toJsonObject ()
 Generate the JSON object representation of the image.
 

Static Public Member Functions

static fromJsonObject ($item)
 Generate an Image object from its JSON or JSON-LD representation.
 

Detailed Description

Class to represent a content-item image object.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Definition at line 12 of file Image.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $url,
  $width = null,
  $height = null 
)

Class constructor.

Parameters
string$urlURL of image
int | null$widthWidth of image in pixels (optional)
int | null$heightHeight of image in pixels (optional)

Reimplemented in ContentItemImage.

Definition at line 43 of file Image.php.

Member Function Documentation

◆ fromJsonObject()

static fromJsonObject (   $item)
static

Generate an Image object from its JSON or JSON-LD representation.

Parameters
object$itemA JSON or JSON-LD object representing a content-item
Returns
Image|null The Image object

Definition at line 95 of file Image.php.

◆ toJsonldObject()

toJsonldObject ( )

Generate the JSON-LD object representation of the image.

Returns
object JSON object

Definition at line 55 of file Image.php.

◆ toJsonObject()

toJsonObject ( )

Generate the JSON object representation of the image.

Returns
object JSON object

Definition at line 74 of file Image.php.


The documentation for this class was generated from the following file: