PHP Class Captioning\Cue

Inheritance: implements captioning\CueInterface
显示文件 Open project: captioning/captioning Class Usage Examples

Protected Properties

Property Type Description
$lineEnding string
$start mixed
$startMS integer
$stop mixed
$stopMS integer
$text string
$textLines array

Public Methods

Method 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

Protected Methods

Method Description
getLastTimeCodePart ( integer $tc_ms ) : string

Private Methods

Method Description
parseTextLines ( $_text )

Method Details

__construct() public method

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

addTextLine() public method

public addTextLine ( string $_line )
$_line string

getCPS() public method

public getCPS ( ) : float
return float

getDuration() public method

public getDuration ( ) : integer
return integer

getFormat() public static method

public static getFormat ( captioning\CueInterface $_cue ) : mixed
$_cue captioning\CueInterface
return mixed

getLastTimeCodePart() protected static method

protected static getLastTimeCodePart ( integer $tc_ms ) : string
$tc_ms integer
return string

getReadingSpeed() public method

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

getStart() public method

public getStart ( ) : mixed
return mixed

getStartMS() public method

public getStartMS ( ) : integer
return integer

getStop() public method

public getStop ( ) : mixed
return mixed

getStopMS() public method

public getStopMS ( ) : integer
return integer

getText() public method

public getText ( ) : string
return string

getTextLine() public method

public getTextLine ( integer $_index ) : string | null
$_index integer
return string | null

getTextLines() public method

public getTextLines ( ) : array
return array

ms2tc() public static method

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

scale() public method

public scale ( $_baseTime, integer $_factor = 1 ) : boolean
$_baseTime
$_factor integer
return boolean

setLineEnding() public method

public setLineEnding ( string $_lineEnding )
$_lineEnding string

setStart() public method

public setStart ( mixed $_start )
$_start mixed

setStartMS() public method

public setStartMS ( integer $_startMS )
$_startMS integer

setStop() public method

public setStop ( mixed $_stop )
$_stop mixed

setStopMS() public method

public setStopMS ( integer $_stopMS )
$_stopMS integer

setText() public method

public setText ( string $_text )
$_text string

shift() public method

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

strlen() public method

public strlen ( ) : integer
return integer

Property Details

$lineEnding protected_oe property

protected string $lineEnding
return string

$start protected_oe property

protected mixed $start
return mixed

$startMS protected_oe property

protected int $startMS
return integer

$stop protected_oe property

protected mixed $stop
return mixed

$stopMS protected_oe property

protected int $stopMS
return integer

$text protected_oe property

protected string $text
return string

$textLines protected_oe property

protected array $textLines
return array