mexoboy/sub-rip

SubRip parser

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mexoboy/sub-rip

dev-master 2020-02-09 22:01 UTC

This package is auto-updated.

Last update: 2025-12-10 11:37:50 UTC


README

Simple library for parsing subtitles in SubRip format.

Library support 2 ways for reading file: read as stream and read from string. By default, all readers use strict mode, but it can be off, to avoid errors in reading non-valid subtitles.

Example for String Reader:

$stringReader = new StringReader($subRipData);

foreach ($stringReader as $record) {
    echo $record->getContent() . "\n";
}

Example for Stream Reader:

$stringReader = new StringReader($subRipData);

foreach ($stringReader as $record) {
    echo $record->getContent() . "\n";
}