Download the PHP package ride/lib-media without Composer

On this page you can find all versions of the php package ride/lib-media. 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 lib-media

ride/lib-media

This library adds support for custom media items, like Youtube videos, Soundcloud music or plain URL's.

MediaItem classes live in the item/ directory, and their factories in the factory directory.

What's In This Library

MediaItemFactory

The MediaItemFactory class is the interface for all media item factories. This factory has two responsibilities:

The AbstractMediaItemFactory has a default implementation for the createFormUrl, createFromId and setClientId methods. Its constructor requires an instance of ride\library\http\client\Client.

The isValidUrl method should always be implemented in the child class, and should contain logic in order to determine if an URL is parseable for the related media item.

MediaItem

The MediaItem class is the interface for all media items. There is an abstract implementation called AbstractMediaItem from which all classes can extend. Each MediaItem class should implement at least following methods:

The parseUrl method will take a given URL and parse it for this specific MediaItem implementation. It can be assumed that this URL is parseable because of the check done in the MediaItemFactory.

Each media item needs a factory for the MediaFactory to be able to use it.

MediaFactory

The MediaFactory interface glues all the MediaItemFactory instances together into an easy facade. It will use specific media item factories to test if a given URL can be parsed.

A generic implementation is provided through the SimpleMediaFactory class.

Code sample

You can check the following code sample to see some of the possibilities of this library:

Related Modules

Installation

You can use Composer to install this library.


All versions of lib-media with dependencies

PHP Build Version
Package Version
Requires ride/lib-http-client Version ^1.0.0
ride/lib-validation Version ^1.0.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 ride/lib-media contains the following files

Loading the files please wait ....