PHP Класс Captioning\Cue

Наследование: implements captioning\CueInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$lineEnding string
$start mixed
$startMS integer
$stop mixed
$stopMS integer
$text string
$textLines array

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
getLastTimeCodePart ( integer $tc_ms ) : string

Приватные методы

Метод Описание
parseTextLines ( $_text )

Описание методов

__construct() публичный Метод

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

addTextLine() публичный Метод

public addTextLine ( string $_line )
$_line string

getCPS() публичный Метод

public getCPS ( ) : float
Результат float

getDuration() публичный Метод

public getDuration ( ) : integer
Результат integer

getFormat() публичный статический Метод

public static getFormat ( captioning\CueInterface $_cue ) : mixed
$_cue captioning\CueInterface
Результат mixed

getLastTimeCodePart() защищенный статический Метод

protected static getLastTimeCodePart ( integer $tc_ms ) : string
$tc_ms integer
Результат string

getReadingSpeed() публичный Метод

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

getStart() публичный Метод

public getStart ( ) : mixed
Результат mixed

getStartMS() публичный Метод

public getStartMS ( ) : integer
Результат integer

getStop() публичный Метод

public getStop ( ) : mixed
Результат mixed

getStopMS() публичный Метод

public getStopMS ( ) : integer
Результат integer

getText() публичный Метод

public getText ( ) : string
Результат string

getTextLine() публичный Метод

public getTextLine ( integer $_index ) : string | null
$_index integer
Результат string | null

getTextLines() публичный Метод

public getTextLines ( ) : array
Результат array

ms2tc() публичный статический Метод

public static ms2tc ( integer $ms, string $_separator = '.', $isHoursPaddingEnabled = true ) : string
$ms integer
$_separator string
Результат string

scale() публичный Метод

public scale ( $_baseTime, integer $_factor = 1 ) : boolean
$_baseTime
$_factor integer
Результат boolean

setLineEnding() публичный Метод

public setLineEnding ( string $_lineEnding )
$_lineEnding string

setStart() публичный Метод

public setStart ( mixed $_start )
$_start mixed

setStartMS() публичный Метод

public setStartMS ( integer $_startMS )
$_startMS integer

setStop() публичный Метод

public setStop ( mixed $_stop )
$_stop mixed

setStopMS() публичный Метод

public setStopMS ( integer $_stopMS )
$_stopMS integer

setText() публичный Метод

public setText ( string $_text )
$_text string

shift() публичный Метод

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

strlen() публичный Метод

public strlen ( ) : integer
Результат integer

Описание свойств

$lineEnding защищенное свойство

protected string $lineEnding
Результат string

$start защищенное свойство

protected mixed $start
Результат mixed

$startMS защищенное свойство

protected int $startMS
Результат integer

$stop защищенное свойство

protected mixed $stop
Результат mixed

$stopMS защищенное свойство

protected int $stopMS
Результат integer

$text защищенное свойство

protected string $text
Результат string

$textLines защищенное свойство

protected array $textLines
Результат array