Download the PHP package davidpersson/mm without Composer

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

xx xx xx xx x x x x x x x x x x -- The PHP media library.

Synopsis

Making media processing portable isn't easy. Retrieving meta data from media through one of the thousand extensions is by times overwhelming. Dealing with MIME-types is most often limited to magic lookup.

This library is concerned with three aspects of media and organized accordingly:

The set of \mm\Media* classes provide abstractions from underlying extensions or libraries and most common methods for operations like resizing and conversion (even between i.e. PDFs, movies and images).

The \mm\Mime\Type class helps with determining the MIME-type or correct extension of a file or stream. It comes with adapters for the fileinfo extension, glob and magic databases from the freedesktop project, as well as modmime style databases.

The files required to make MIME detection work autonomously (i.e. without the fileinfo extension installed) are shipped with the library. You'll find those files in the data directory. Please note that the MIME magic implementation in pure PHP will always be a lot slower than the PHP extensions in C and currently has to be considered experimental.

Features

The most significant features of this library are:

Copyright & License

MM, the PHP media library is Copyright (c) 2007 David Persson if not otherwise stated. The code is distributed under the terms of the MIT License. For the full license text see the LICENSE file.

Requirements

The library is known to run fine under linux and darwin. Depending on the adapters you are using you may need (this is a selection):

Installation

The preferred installation method is via composer. You can add the library as a dependency via:

$ composer require davidpersson/mm

To bootstrap and pre-configure the library load the bootstrap file:

require /path/to/mm/bootstrap.php

Quickstart: MIME-type Detection

Before we can use any of the classes we must configure them. The following is just a minimal example. Have a look at the included bootstrap.php for more information what's possible.

More documentation for MIME-type detection is available in the docs subdirectory.

Guess the MIME type of the file.

Guess the extension (suffix) for an existing file or a MIME type.

Determine the common lowercase media name, with and without hints from a magic lookup.

Quickstart: Media Processing

First we configure the class.

A common task is to convert an image into another format, apply some compression while ensuring it has the sRGB profile embbeded. We'll utilize the factory method here which handles MIME-type detection of the source file for us and returns an appropriate \mm\Media\Process* class for us.

Using the Ffmpeg adapter we can transcode videos programmatically. Using the passthru method we can access the adapter more or less directly.

Quickstart: Media Information

First we configure the class.

Getting information from an image. Information is assembled by all configured adapters for the type.

Running the Tests

This library is continously integrated. Please check the following URL for information on the status of the latest builds:

http://travis-ci.org/#!/davidpersson/mm

Tests for this library are PHPUnit based. To run the tests you'll need to have PHPUnit installed[1]. Following command will run all the tests.

$ phpunit

[1] http://www.phpunit.de/manual/current/en/installation.html

Documentation

Documentation is available in the docs directory.


All versions of mm with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.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 davidpersson/mm contains the following files

Loading the files please wait ....