Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Caption Class Reference

Handles <media:text> captions as defined in Media RSS. More...

Public Member Functions

 __construct ($type=null, $lang=null, $startTime=null, $endTime=null, $text=null)
 Constructor, used to input the data.
 
 __toString ()
 String-ified version.
 
 get_endtime ()
 Get the end time.
 
 get_language ()
 Get the language.
 
 get_starttime ()
 Get the start time.
 
 get_text ()
 Get the text of the caption.
 
 get_type ()
 Get the content type (not MIME type)
 

Public Attributes

string $endTime
 End time.
 
string $lang
 Language.
 
string $startTime
 Start time.
 
string $text
 Caption text.
 
string $type
 Content type.
 

Detailed Description

Handles <media:text> captions as defined in Media RSS.

Used by {

See also
SimplePie\Enclosure\get_caption()} and {
SimplePie\Enclosureget_captions()}

This class can be overloaded with {

See also
SimplePie\SimplePie\set_caption_class()}

@subpackage API

Constructor & Destructor Documentation

◆ __construct()

Caption::__construct ( $type = null,
$lang = null,
$startTime = null,
$endTime = null,
$text = null )

Constructor, used to input the data.

For documentation on all the parameters, see the corresponding properties and their accessors

Member Function Documentation

◆ __toString()

Caption::__toString ( )

String-ified version.

Return values
string

◆ get_endtime()

Caption::get_endtime ( )

Get the end time.

Return values
string|nullTime in the format 'hh:mm:ss.SSS'

◆ get_language()

Caption::get_language ( )

Get the language.

@externalurl http://tools.ietf.org/html/rfc3066

Return values
string|nullLanguage code as per RFC 3066

◆ get_starttime()

Caption::get_starttime ( )

Get the start time.

Return values
string|nullTime in the format 'hh:mm:ss.SSS'

◆ get_text()

Caption::get_text ( )

Get the text of the caption.

Return values
string|null

◆ get_type()

Caption::get_type ( )

Get the content type (not MIME type)

Return values
string|nullEither 'text' or 'html'

Member Data Documentation

◆ $endTime

string Caption::$endTime

End time.

See also
get_endtime()

◆ $lang

string Caption::$lang

Language.

See also
get_language()

◆ $startTime

string Caption::$startTime

Start time.

See also
get_starttime()

◆ $text

string Caption::$text

Caption text.

See also
get_text()

◆ $type

string Caption::$type

Content type.

See also
get_type()

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