Download the PHP package 1tomany/data-uri without Composer

On this page you can find all versions of the php package 1tomany/data-uri. 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 data-uri

Data URI Parser for PHP

This simple library allows you to easily convert a wide variety of data into a temporary file represented by a lightweight immutable value object. It also includes Symfony bundle integration for autowiring, serialization, and console usage.

Installation

API Overview

The four methods exposed by this library are:

Each method returns a OneToMany\DataUri\Record\TemporaryFile value object which implements the interface OneToMany\DataUri\Contract\Record\TemporaryFileInterface. By default, the TemporaryFile object will delete any filesystem resources it knows about when it is explicitly destructed or garbage collected.

The DataDecoder::decode() method is the most versatile as it allows for a wide variety of inputs:

DataDecoder::decode()

Use this method when the type or source of data is unknown. This method has the following arguments:

Inside DataDecoder::decode()

Under the hood, the decode() method uses the fopen() and stream_get_contents() functions provided by the PHP standard library, which means the data passed to it can be any supported stream.

DataDecoder::decodeBase64()

Use this method when the data is known to be base64 encoded but NOT encoded as a data URI. This method has the following arguments:

DataDecoder::decodeText()

Use this method when the data is known to be plaintext. This method has the following arguments:

DataDecoder::fromMarkdown()

Use this method when the data is known to be Markdown. This method has the following arguments:

Symfony Integration

The package includes OneToMany\DataUri\DataUriBundle. Symfony Flex enables it automatically after installation, and OneToMany\DataUri\DataDecoder can then be autowired without additional service configuration:

No bundle configuration is necessary. The bundle also:

The framework-independent API remains available by constructing DataDecoder directly.

Examples

Run and inspect the decode.php file for examples on how to use the DataDecoder::decode() method.

Credits

License

The MIT License


All versions of data-uri with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-ctype Version *
ext-fileinfo Version *
ext-mbstring Version *
symfony/config Version ^7.2|^8.0|^8.1
symfony/console Version ^7.2|^8.0|^8.1
symfony/dependency-injection Version ^7.2|^8.0|^8.1
symfony/filesystem Version ^7.2|^8.0|^8.1
symfony/http-kernel Version ^7.2|^8.0|^8.1
symfony/serializer Version ^7.2|^8.0|^8.1
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 1tomany/data-uri contains the following files

Loading the files please wait ...