Download the PHP package rawebone/injector without Composer

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

Injector

Injector provides a low level service injection system partly influenced by that found in AngularJS. The idea is somewhat similar to dependency injection although it actually injects services - the difference between the two is nuanced but loosely: DI works based on types, overriding on a per class definition whereas services work on names.

For example, in a DI scenario these two log instances will be the same (without some other configuration):

While DI and configuration of this kind is useful in very large applications for smaller more concise applications the cost of implementation is higher as it is normally more complex. As such in these smaller applications, SL can normally wield more of a benefit as you still get lazy loading of instances and the ability to easily change a definition.

However traditional SL systems have a drawback in that they work on a pull system:

As such your application, in addition to some syntax and bloat from the DSL, will also not be as succinct (in my humble opinion).

This library provides a low level mechanism for injecting services into instances to clear some of the bloat, in addition to some low level utilities for working with functions and function signatures.

The Injector Approach

As stated, the "resolve anything callable to a service name" is a broad brush tactic but it doesn't give us what we normally want. As such implementers can specify their own behaviour by implementing the Rawebone\Injector\ResolverInterface which takes in a service name and returns a value to be injected.

The library also provides a more common solution to the problem through the Rawebone\Injector\RegisterResolver:

License

MIT, please see the included document for details.


All versions of injector with dependencies

PHP Build Version
Package Version
No informations.
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 rawebone/injector contains the following files

Loading the files please wait ....