Download the PHP package robert430404/rc-container without Composer

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

Latest Stable Version Build Status codecov

What Is This?

This is RC Container. This is a simple dependency injection container that allows you to register services, parameters, and factories for your application and then retrieve/de-register them.

Why Write This?

I did it to flex my brain, and get a full understanding of how DI-Containers work in the PHP space. Rather than just reading about it and assuming I knew what did what, I wrote this to solidify my knowledge.

Installing The Package

To install and use this package, install it with composer:

composer require robert430404/rc-container

How Does It Work?

The container relies on composer for the autoloading of the classes. You then create a new instance of the Container() object and start assigning your services/parameters/factories to the instance.

You can also assign multiple services, parameters, or factories in a single call using this method:

Or you can use a more conceise syntax like this:

Once you have your services/parameters/factories defined, you then call the retrieval methods on the container to get access to your registered services/parameters/factories.

What Are Some Of The Features?

The container allows you to bind service, factories, and parameters to it. This allows you to have a central place to access your dependencies and inject what ever is needed as needed. You can also inject interlocking dependencies via the container by passing the container into the closure.

The same method works to pass around services:

This gives you a robust and easy to use container that should suit most DI needs.


All versions of rc-container with dependencies

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

Loading the files please wait ....