PHP code example of crossknowledge / subconverter-bundle

1. Go to this page and download the library: Download crossknowledge/subconverter-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crossknowledge / subconverter-bundle example snippets


class AppKernel	extends Kernel
{
  public function registerBundles()
  {
	  $bundles = array(
      ...
      new \CrossKnowledge\SubConverterBundle\CrossKnowledgeSubConverterBundle(),
		);
    ...

  $this->get('crossknowledge.subconverterbundle.converter')->convert($inputFilePath, $outputFilePath, $outputFormat, $

$inputFilePath // "/tmp/my_subtitle.srt"
$outputFilePath // "/tmp/my_subtitle.webvtt"
$outputFormat // ['srt'|'webvtt'|'ttaf1'|'txt']
$