PHP Class Captioning\Cue

Inheritance: implements captioning\CueInterface
Afficher le fichier Open project: captioning/captioning Class Usage Examples

Protected Properties

Свойство Type Description
$lineEnding string
$start mixed
$startMS integer
$stop mixed
$stopMS integer
$text string
$textLines array

Méthodes publiques

Méthode Description
__construct ( mixed $_start, mixed $_stop, string $_text = '' ) Cue constructor.
addTextLine ( string $_line )
getCPS ( ) : float
getDuration ( ) : integer
getFormat ( captioning\CueInterface $_cue ) : mixed
getReadingSpeed ( ) Computes Reading Speed (based on VisualSubSync algorithm)
getStart ( ) : mixed
getStartMS ( ) : integer
getStop ( ) : mixed
getStopMS ( ) : integer
getText ( ) : string
getTextLine ( integer $_index ) : string | null
getTextLines ( ) : array
ms2tc ( integer $ms, string $_separator = '.', $isHoursPaddingEnabled = true ) : string
scale ( $_baseTime, integer $_factor = 1 ) : boolean
setLineEnding ( string $_lineEnding )
setStart ( mixed $_start )
setStartMS ( integer $_startMS )
setStop ( mixed $_stop )
setStopMS ( integer $_stopMS )
setText ( string $_text )
shift ( integer $_time ) Set a delay (positive or negative)
strlen ( ) : integer

Méthodes protégées

Méthode Description
getLastTimeCodePart ( integer $tc_ms ) : string

Private Methods

Méthode Description
parseTextLines ( $_text )

Method Details

__construct() public méthode

Cue constructor.
public __construct ( mixed $_start, mixed $_stop, string $_text = '' )
$_start mixed
$_stop mixed
$_text string

addTextLine() public méthode

public addTextLine ( string $_line )
$_line string

getCPS() public méthode

public getCPS ( ) : float
Résultat float

getDuration() public méthode

public getDuration ( ) : integer
Résultat integer

getFormat() public static méthode

public static getFormat ( captioning\CueInterface $_cue ) : mixed
$_cue captioning\CueInterface
Résultat mixed

getLastTimeCodePart() protected static méthode

protected static getLastTimeCodePart ( integer $tc_ms ) : string
$tc_ms integer
Résultat string

getReadingSpeed() public méthode

Computes Reading Speed (based on VisualSubSync algorithm)
public getReadingSpeed ( )

getStart() public méthode

public getStart ( ) : mixed
Résultat mixed

getStartMS() public méthode

public getStartMS ( ) : integer
Résultat integer

getStop() public méthode

public getStop ( ) : mixed
Résultat mixed

getStopMS() public méthode

public getStopMS ( ) : integer
Résultat integer

getText() public méthode

public getText ( ) : string
Résultat string

getTextLine() public méthode

public getTextLine ( integer $_index ) : string | null
$_index integer
Résultat string | null

getTextLines() public méthode

public getTextLines ( ) : array
Résultat array

ms2tc() public static méthode

public static ms2tc ( integer $ms, string $_separator = '.', $isHoursPaddingEnabled = true ) : string
$ms integer
$_separator string
Résultat string

scale() public méthode

public scale ( $_baseTime, integer $_factor = 1 ) : boolean
$_baseTime
$_factor integer
Résultat boolean

setLineEnding() public méthode

public setLineEnding ( string $_lineEnding )
$_lineEnding string

setStart() public méthode

public setStart ( mixed $_start )
$_start mixed

setStartMS() public méthode

public setStartMS ( integer $_startMS )
$_startMS integer

setStop() public méthode

public setStop ( mixed $_stop )
$_stop mixed

setStopMS() public méthode

public setStopMS ( integer $_stopMS )
$_stopMS integer

setText() public méthode

public setText ( string $_text )
$_text string

shift() public méthode

Set a delay (positive or negative)
public shift ( integer $_time )
$_time integer Delay in milliseconds

strlen() public méthode

public strlen ( ) : integer
Résultat integer

Property Details

$lineEnding protected_oe property

protected string $lineEnding
Résultat string

$start protected_oe property

protected mixed $start
Résultat mixed

$startMS protected_oe property

protected int $startMS
Résultat integer

$stop protected_oe property

protected mixed $stop
Résultat mixed

$stopMS protected_oe property

protected int $stopMS
Résultat integer

$text protected_oe property

protected string $text
Résultat string

$textLines protected_oe property

protected array $textLines
Résultat array