Download the PHP package buzzingpixel/container without Composer

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

BuzzingPixel ContainerInterface implementation

A simple, concrete, easy to configure implementation of the PSR ContainerInterface. This container will auto-wire whatever it can. You can also provide bindings directly.

Configuring bindings

Bindings are configured by an array in the Container's constructor.

The keys in this array should be the classnames you wish to provide bindings for.

The values can be:

An object

If an object is provided, it will be treated as the concrete implementation for the classname.

A string

If a string is provided as the value, it will be treated as an ID for another entry in the container and will recurse back to the get method to get the specified item. This is most useful for binding interfaces to concrete implementations.

A callable

If a callable is provided, it will be called the first time the entry is requested and is expected to provide the concrete implementation. It receives as its only argument the container instance.

Example:

Configuring constructor params

Sometimes, you want to let auto-wiring do its thing, but you need to configure just one parameter on some class — say, maybe an API key string. That's why the container constructor has array $constructorParamConfigs as an argument. The array should be instances of \BuzzingPixel\Container\ConstructorParamConfig.

Through the ConstructorParamConfig constructor, you provide the name of the class to be configured ($id), the name of the param to configure, and the value to give.

Example:

Caching

The container is pretty efficient, and for many applications, you may not need caching. However, if you're looking to eek out a little more performance in production, you can provide a cache implementation as the third argument in the constructor of the container. You could write your own, or you can use the file cache implementation bundled with this package.

The cache is invoked for any auto-wired class so that after it's been auto-wired, a factory is written to the cache file and loaded into the bindings of the container on next request so that reflection is not used for this class on future requests.

Example:


All versions of container with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^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 buzzingpixel/container contains the following files

Loading the files please wait ....