Download the PHP package redot/container without Composer

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

Redot PHP Container

tests

Minimal, Lightweight, and Fast PHP Dependency Injection Container

Installation

Testing

Usage

The methodologies of the container are based on the Dependency Injection paradigm, using the ReflectionClass to get class dependencies.

To use the container, you must first create a new instance of the container.

Or just use the static method Container::getInstance(), that will return the globally available container if it exists, or create a new one.

After you have created the container, you can bind your dependencies to the container.

Also, you can create a singleton, that will be returned every time you call the get method.

Singletons are useful for classes that are expensive to instantiate, but only need to be created once.

To get a dependency from the container, you can call the make method.

The main difference between make and get is that make accepts a second parameter, which is an array of parameters to pass to the constructor of the class, while get does not because of implementing PSR-11

By the way you can also create an alias for a class, so you can call it with a different name.

Auto-wiring

Don't worry about the auto-wiring, the container will do it for you.

It will automatically bind the dependencies of the class, and if the class has a constructor, it will pass the dependencies to it, also the container can inject specific method dependencies using the call method.

And that's it! Enjoy ✌.


All versions of container with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/container Version ^2.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 redot/container contains the following files

Loading the files please wait ....