Download the PHP package iviphp/container without Composer

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

Ivi Container

Dependency injection container for the IviPHP ecosystem.

Overview

iviphp/container provides a lightweight dependency injection container for IviPHP packages and applications.

It supports:

The container can resolve concrete classes automatically through PHP reflection.

Installation

Requirements

Creating a container

Automatic constructor injection

Concrete classes do not need to be registered manually when their dependencies can also be resolved.

The container automatically creates Database and injects it into UserRepository.

Registering bindings

An interface can be connected to a concrete implementation.

A binding creates a new instance each time it is resolved.

Singleton services

Singleton services are resolved once and reused.

Closure factories

A closure can be used when service creation requires custom logic.

Factories receive the current container instance.

A factory must return an object.

Registering existing instances

An existing object can be stored directly in the container.

Registered instances are always shared.

Checking services

Concrete classes are considered resolvable even when they have not been explicitly registered.

Removing services

Remove a binding and its resolved singleton instance:

Remove every binding and resolved instance:

Constructor parameter resolution

The container resolves class dependencies automatically.

Parameters with default values are supported.

Nullable unresolved parameters receive null.

Scalar parameters without a default value cannot be resolved automatically.

Resolving this class throws a BindingResolutionException.

Circular dependency detection

Circular dependency chains are detected during resolution.

Resolving either service throws a BindingResolutionException describing the dependency chain.

Available methods

Exceptions

ContainerException

Base exception for container-related failures.

BindingResolutionException

Thrown when the container cannot resolve a service because of:

Design principles

This package is responsible only for registering and resolving application dependencies.

Service providers, application bootstrapping and framework lifecycle management belong to higher-level IviPHP packages.

Ecosystem

This package is part of the IviPHP ecosystem:

Contributing

Contributions should preserve the focused scope of this package.

New features should:

Security

Please report security issues privately to the Softadastra maintainers instead of opening a public issue.

License

This project is licensed under the MIT License.

Maintainer

Created and maintained by Softadastra.


All versions of container with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
iviphp/contracts Version ^0.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 iviphp/container contains the following files

Loading the files please wait ...