Download the PHP package mohamed-amine/ioc-container without Composer

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

Build Status

How to install:

Via composer

What can it do:

How to use it:

Create the contianer:

in order to use all the features we need to create a container first

Create an instance in the container:

Bind instances into the container:

To bind an existing instance into the container

Now we will be able to access our instance anywhere in the application like this:

Build instances from services locators (short names):

We can define service locators using the regiter method

Then we can build an instance using this service locator

Registering Types:

Types are registered to help the container to resolve classes dependencies, for example if a class A have a dependency of Type SomeInterface which is an interface, we will have to register this type first in order to be able to resolve it:

Calling instances from the container:

we can call instances from the container using 2 methods


All versions of ioc-container with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
phpunit/phpunit Version ^11.1
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 mohamed-amine/ioc-container contains the following files

Loading the files please wait ....