Download the PHP package minotar/minotar-php without Composer

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

Minotar-PHP

Build Status Coverage Status

As much as we'd like it to be, if you've used Minotar for a length of time, you'll know that it isn't the most reliable service, out-of-the-box. After all, it is a free service, and is used by some of the most popular Minecraft sites on the net, so it takes a good bit of load.

This is a nice, not-too fussy package for handling the display of Minotars on your site with caching, so that whenever your site is up, you should be able to display Minotars.

Installation

This comes as a Composer package. Composer is an awesome tool for managing your dependencies in PHP projects; you should definitely start using it, if you aren't already! Simply adding the follow lines to your composer.json...

Example

This is a basic example, showing how one would cache Minotars to your server, and define a page to serve them off of.

minotar.php

index.php
serve.php

Not too hard, eh? Read on for some more fun and advanced usage.

Components

The three primary components of minotar-php are the adapters, encoders, and the MinotarDisplay itself. These are accessed through a facade, Minotar\Minotar that passes off appropriate calls.

Minotar::adapter

Minotar::adapter($name, $arguments...) is actually a proxy to desarrolla2/Cache adapters.

First you pass in the name, such as "file", or "mongo", to give some examples (see the full list on the package's Github page). If you pass in additional arguments, these will be given to the constructor of the cache. Calling Minotar::adapter('file', '/directory') is the equivalent of saying $adapter = new File($cacheDir);

After you call this function, subsequent MinotarDisplays that are made will use the formed adapter. Minotar::adapter also returns the adapter, allowing you to add additional options or make changes if needed. Again, see the documentation on the Cache package if you're interested in that.

Minotar::encoder

Minotar::encoder($name, $arguments...) is similar in construction to the adapter(). MinotarDisplays use the last formed adapter, and an instance of the adapter is returned. This essentially defines how images will be displayed on your site.

Closing Remarks

Feel free to read through the code if you'd like a better understanding of what's happening. Fork, share, use, and contribute.

Extending

This package is fairly extensible. It's build around illuminate/container for its dependency injection. For example, you can inject your own custom encoders or adapters if you want to (or contribute them here!), via Minotar::app(). Few things are bound tightly; you can inject any of your own components to minotar-php pretty easily.

Contributing

To contribute:


All versions of minotar-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/http-foundation Version ~2.4
desarrolla2/cache Version v1.7.0
illuminate/container Version 4.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 minotar/minotar-php contains the following files

Loading the files please wait ....