Download the PHP package snordian/h5p-extractor without Composer

On this page you can find all versions of the php package snordian/h5p-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package h5p-extractor

H5P Extractor - proof of concept

Tool that is supposed to be be usable for rendering H5P content server-side.

Quick start (to be done properly (!))

  1. Copy the library to your ow project. You can also use composer, but you will need to fetch the library from github, because it is not available via packagist (yet).

    Your composer.json file should contain

    and any other of your dependencies, of course.

  2. Use require_once <path_to_h5p-extractor> . '/app/H5PExtractor.php'; to load code. It does autload everything it needs, but it is not instantiated by any autoload itself, because it it seems appropriate to only load H5PExtractor once actually needed.

  3. Use $h5pExtractor = new H5PExtractor\H5PExtractor($config); to create an instance, where $config is supposed to be an optional an associative array containing configuration items, e.g.:

    By default, if that value is not set or no $config argument is passed, H5PExtractor will

    • try to create/use a directory named uploads inside its main h5p-extractor directory,
    • use a default render width of 1024 pixels,
    • use the default or set render width if no machineName specific render width was set for a particular content type,
    • not apply and custom CSS,
    • return base64 encoded representations of files inside the file if no Url to core, libraries or the content is set,
    • return solutions unmodified if no solutionStyle is set.

    Please ensure that the respective uploads directory can be read and written by your server process.

  4. Use something like

    where

    • file is supposed to be the H5P file that contains the H5P content that is supposed to be rendered - here a standard temporary file generated by a form upload.
    • format specifies the desired output format (currently html (default) or text) - here the format key of the form upload.

    The return value is an associative array with the key result or error.

    • result contains the requested output format
    • error contains an error message if something went wrong.

Creating/changing generators

A generator is what creates a distinct output format from an H5P content. It will commonly be HTML or some plain text variant, but could be something different, too.

The generation process resembles how the H5P core composes H5P content from different content types, and methods such as newRunnable or attach were called that way because they have direct counterparts in H5P core/a content type. They also use the same arguments, even though they're not all required here. If you know newRunnable or attach, then you already know what they do here. And if you don't and learn what they do here, you learn something about H5P core and H5P content types as a side product :-)

TODO: Explain Structure

TODO: Explain Generator

TODO: Explain GeneratorInterface

Open issues:


All versions of h5p-extractor with dependencies

PHP Build Version
Package Version
Requires h5p/h5p-core Version ^1.28.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package snordian/h5p-extractor contains the following files

Loading the files please wait ...