메소드 |
설명 |
|
__construct ( $_filename, $_encoding = '' ) |
srtFile constructor |
|
build ( boolean $stripTags = false, $stripBasic = false, array $replacements = [] ) |
Builds file content (file_content[_notag]) |
|
buildPart ( integer $from, integer $to, boolean $stripTags = false, $stripBasic = false, array $replacements = [] ) |
Builds file content (file_content[_notag]) from entry $from to entry $to |
|
calcStats ( ) |
Computes statistics regarding reading speed |
|
changeFPS ( float $old_fps, float $new_fps ) |
Converts timecodes based on the specified FPS ratio |
|
cp1252_to_utf8 ( string $text ) |
Converts Windows-1252 (CP-1252) to UTF-8 |
|
deleteSub ( integer $_index ) |
Deletes a cue |
|
detect_utf_encoding ( string $text ) |
Detects UTF encoding |
|
getEncoding ( ) |
|
|
getFileContent ( ) |
Getters |
|
getFilename ( ) |
|
|
getSub ( $idx ) |
|
|
getSubCount ( ) |
|
|
getSubs ( ) |
|
|
isValid ( string $_filename ) : boolean |
Checks if the file is a valid SubRip file |
|
isWebVTT ( ) |
|
|
mergeSrtFile ( srtFile $_srtFile ) |
Imports subtitles from another srtFile object |
|
save ( string $filename = null, boolean $stripTags = false ) |
Saves the file |
|
saveStats ( string $filename, $output = 'html' ) |
Saves statistics as XML file |
|
searchCueFromTimecode ( $_start ) |
|
|
searchWord ( string $word, boolean $case_sensitive = false, boolean $strict = false ) : array |
Searchs a word/expression and returns ids of the matched entries |
|
setWebVTT ( $_is_WebVTT = true ) |
|
|
shift ( $time, integer $startIndex = false, integer $endIndex = false ) |
Shifts a range of subtitles a specified amount of time. |
|
sortSubs ( ) |
Sorts srtFile entries |
|
sync ( integer $startIndex, integer $startTime, integer $endIndex, integer $endTime, boolean $syncLast = true ) : boolean |
Auto syncs a range of subtitles given their first and last correct times. |
|