PHP code example of romanpravda / php-scorm-packager

1. Go to this page and download the library: Download romanpravda/php-scorm-packager 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/ */

    

romanpravda / php-scorm-packager example snippets


$config = [
    "title" => "",
    "identifier" => "",
    "version" => "",
    "source" => "",
    "destination" => "",
    "masteryScore" => "",
    "startingPage" => "",
    "organization" => "",
    "metadataDescription" => "",
];

$packager = new \Romanpravda\Scormpackager\Packager($config);
$packager->buildPackage();

$config = [
    ...
];

$metadataConfig = [
    "entryIdentifier" => "",
    "catalogValue" => "",
    "lifeCycleVersion" => "",
    "classification" => "",
];

$packager = new \Romanpravda\Scormpackager\Packager($config, $metadataConfig);
$packager->buildPackage();