Download the PHP package ellipse/container-reflection without Composer

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

Reflection container

This package provides a Psr-11 container decorator enabling auto-wiring to any Psr-11 container implementation.

Require php >= 7.0

Installation composer require ellipse/container-reflection

Run tests ./vendor/bin/kahlan

Getting started

This package provides an Ellipse\Container\ReflectionContainer class which can be used to decorate any Psr-11 container. By default it enables auto wiring for all the existing classes, modifying the behaviors of the original container ->has() and ->get() methods:

The ->has() method now returns true for aliases contained in the original container but also when the given alias is an existing class name.

The ->get() method returns the value contained in the original container when the given alias is defined. Otherwise when the alias is an existing class name then auto wiring is used to return an new instance of this class. It means php reflection feature is used to extract the class constructor parameters and the reflection container ->get() method is called to retrieve a value for all parameters type hinted as a class name. For the other parameters their default values are used. Once a value is retrieved for all the class constructor parameters, a new instance of the class is built using those values. When called multiple times, the same instance of the class is returned like any Psr-11 container would do.

This auto wiring feature can be restricted to classes implementing a specified list of interfaces.

Restricted auto wiring

The ReflectionContainer class takes an optional array of interface names as second parameter. When this array is not empty, auto wiring is enabled only for classes implementing at least one of those interfaces.

For exemple when an application has a lot of controllers it can be an exaustive task to register all of them into the container. To allow flexibility without loosing control on how the application services are created, the ReflectionContainer can be set up to allow auto wiring only for classes implementing a ControllerInterface.


All versions of container-reflection with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
psr/container Version ^1.0
ellipse/resolvable-class Version ^1.0.6
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 ellipse/container-reflection contains the following files

Loading the files please wait ....