Download the PHP package evelikto/di without Composer

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

build coverage scrutinizer

evelikto-di

The most flexible (ευέλικτος!) dependency injection container of the world for PHP. Use just the features you want without runtime configuration costs.

Motivation

Although there are dozens of PHP DI libraries on GitHub, there is none which provides zero runtime-cost container configuration. Or configuration, which may easily be decomposed into smaller chunks, or which can be extended for use in different environments. Evelikto-DI goals are to combine performance, small size, maximal flexibility with an easy to use container config.

Installation

Evelikto is available via Composer/Packagist:

Or via Composer CLI:

Usage

Class \evelikto\di\AppContext is the default implementation of the DI container. The basic usage is to instantiate the container with the new-operator, passing the application config to the constructor, and then either passing the container to the framework, or to use the container to initialize the framework.

The configuration class must follow a few conventions:

  1. Every method in the class is considered to be a factory method.
  2. Every constant in the class is considered to be a configuration value.
  3. A constant can also represent an interface name alias (equal to the implementing concrete class).
  4. A method can also map an interface to a factory method.

The big advantage of this approach is the full freedom how to decompose your configuration. It also allows you to define multiple configurations in natural ways through native PHP means. And the best news is - you pay absolutely nothing for it in terms of CPU cycles!

Conclusion: 'class as config'-convention is extremely powerful, fast and easy to use.


All versions of di with dependencies

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

Loading the files please wait ....