Download the PHP package downing/tupper without Composer

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

Tupper: the Dependency Injection container for PHP

Build Status Coverage Status License: MIT StyleCI

A simple, no-nonsense declarative IoC Container written in PHP for Dependency Injection (DI).

Dependency Injection and Dependency Inversion are powerful concepts that improve code readability, maintainability and stability.

More often than not, you'll want a IoC container that allows you to manage these dependancies from one place. These containers are often convoluted and technically expensive, creating friction between you and your code. This library removes all of the fluff and leaves just the essentials, allowing you to quickly implement DI in your project.

Installation

This package is available via composer:

composer require downing/tupper

Basic Usage

To use the container, create an instance of it in your project:

Then, during your system registration, you'll want to register your dependencies. You can do so using the following syntax:

To resolve a dependency out of the container, you may do one the following:

You may bind almost any abstraction to any implementation. Here are some examples:

You can check for the existence of a binding using the has method:

You can also remove an existing binding using the remove method:

Advanced Usage

Occasionally, you will want to bind a value into the container as a singleton. That is to say that every time you request an implementation from the same instance of a container, it should return a single reference rather than a new instance. You may do so with the following syntax:

When you resolve a dependency through the container, it will attempt to resolve any dependencies of that dependency through the container too. This allows for nested dependencies, which can be very powerful. You do not need to bind a class if it does not rely on an implementation. The container will automatically resolve it for you upon request, even if it has its own dependencies.

Bindings that provide a Closure are resolved in the same manner. This allows you to request dependencies in the closure parameters and have them automatically resolved for you to use. You may, of course, request a binding from the container inside the Closure too.

This package has a full test suite written in PhpUnit, so please feel free to view the tests for advanced usage and to see what is possible.

Get in Touch

If you have questions, suggestions or just want to chat, find me on Twitter @LukeDowning19


All versions of tupper with dependencies

PHP Build Version
Package Version
No informations.
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 downing/tupper contains the following files

Loading the files please wait ....