Download the PHP package modethirteen/opencontainer without Composer

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

OpenContainer

A dependency injection container for PHP, please enjoy responsibly.

github.com codecov.io Latest Stable Version Latest Unstable Version

About

OpenContainer was created as an attempt to leverage strict type checking available in full-featured PHP development environments, such as JetBrains PHPStorm, or the native strict type checking of PHP 7+, when managing dependencies from a centralized container. In addition, it contains some experiments with reflection and proxies in order to avoid problems when circular dependencies are introduced in the container's dependency chain.

In addition to exposing dependencies as type-checked class properties, OpenContainer is also compatible with the PSR-11 Container Interface, for interoperability with several PHP frameworks.

Requirements

Installation

Use Composer. There are two ways to add OpenContainer to your project.

From the composer CLI:

Or add modethirteen/opencontainer to your project's composer.json:

dev-main is the main development branch. If you are using OpenContainer in a production environment, it is advised that you use a stable release.

Assuming you have setup Composer's autoloader, OpenContainer can be found in the modethirteen\OpenContainer\ namespace.

Adding OpenContainer to your application

Simply instantiate OpenContainer and you're ready to go.

Injectable Class

An injectable class is instantiated by injecting the container at construction time. In this example, Foo, Bar, and Baz are all types registered in the container. If a registered type in the container requires Baz's method doSomething(), Baz must first pull it's dependencies, Foo and Bar, from the container (and furthermore, their dependencies, creating a dependency tree).

Registering Types

Registering a type requires a symbol to identify the type when fetching it's instantiated instance from the container, and the fully qualified class name to build.

Registering Instances

Registering an instance requires a symbol to identify the instance when fetching from the container, and the already-created instance itself. Registering an instance is useful when the type's constructor cannot meet the requirements of an injectable class.

Registering Builders

Registering a builder requires a symbol to identify the instance when fetching it from the container, and a closure function to execute the first time it is fetched. Registering a builder is useful if there are specialized steps that must be taken before the instance is created.

Deferred Container

A deferred container attempts to use reflection and class proxies to avoid circular dependencies. A deferred container returns proxies, which are not materialized until a method or property is accessed on the proxy. This behavior is useful as without it, every dependency in the tree is instantiated when the root dependency is first instantiated (whether those downstream dependencies will be eventually used or not). Without deferring dependency instantiation until those dependencies are actually needed, any circular dependency returns a null value, an endless nested function loop, or raises an Undefined Property warning if they can't be resolved.


All versions of opencontainer with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.12
psr/container Version ~1.0.0
ocramius/proxy-manager Version ~2.10.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 modethirteen/opencontainer contains the following files

Loading the files please wait ....