Download the PHP package techdata/context-di-bundle without Composer

On this page you can find all versions of the php package techdata/context-di-bundle. 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 context-di-bundle

ContextDI

Allows for context dependency injection.

Concept

The concept is that there is often the need to know the context of the request. A context can be made up of one or more different facets such as User, Customer, Domain, GeoLocation, User IP, The presence of an outstanding quote, etc

The bundle builds on the existing Symfony DI system by allowing custom providers and consumers to be defined and then tagghed with what the need or what they can provide.

The system does not load the context until it is needed.

There is cache so that the context is not recomputed everytime a service wants to use it.

Consumer

A consumer service must implement the interface and then be tagged with one or more tags of name "context_consumer" which it wants to consume. The tag needs to have an attribute of "context_name" which is a string that specifies which type of context it is looking for.

Provider

A provider service must implement the interface and then be tagged with a single tag of name "context_provider" which it wants to provide. The tag needs to have an attribute of "context_name" which is a string that specifies which type of context being provided.

Cache

There is a cache which is checked prior to attempting to resolve the context. if the context is already available in the cache, it will be used. The default cache service caches the contexts per request.

Configuiration

The available types of context need to be specified (or "registered") in the main config file ("config.yml"). This is done by specifying the name of an interface or class which will be provided by the provider when the context is resolved. This ensures only certain contexts are available, and the context types are known to the consumer which will need to use them. Example.

Optionally, the cache type can be switched to a different cache service which implements the . This can be done by specifying the cache service name in the config as shown below. This defaults to "tech_data_context_di.cache.single_request" which is a per request cache.

Included Providers

Some providers for common use cases will be added soon.


All versions of context-di-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/symfony Version >=2.3.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 techdata/context-di-bundle contains the following files

Loading the files please wait ....