Download the PHP package dispify/weaver without Composer

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

Build Status codecov GitHub license

Packagist PHP Version Support PSR-11 Support

Weaver

The simple Dependency Injection container with autoconfiguration and autowiring. Inspired by The DependencyInjection Component.

This library can help you to configure a lot of services for an example for a module test.

Getting started

Before using Weaver in your project, add it to your composer.json file:

Usage

:warning: When you register any service it is registered with specified class name neither implemented interfaces nor class aliases

:warning: When the service has been instantiated Weaver overwrites all services which names are equals to the implemented interfaces, or the class aliases of the service with this instance of the service.

Features

Global shared parameters & Manual instantiated external services

The pre-defined parameters and the services can be provided manually. Any scalar value will be always registered as a named parameter.\ Any object will be registered as a service with its class name, its parents class names, implemented interfaces and its declared class aliases (requires to include package "dispify/class_aliases")

Lazy instantiating

When you register any service you should provide a class name of the service and an array of the arguments of the constructor. The service will be instantiated only when this service will be requested by another service or an external caller.

The array of the arguments can be both an array of key-value and an indexed array.

Autoconfiguration

When service is requested to be instantiated the first action is determination of constructor's arguments via reflection. Weaver tries to resolve each argument with existent data such as arguments, services, shared parameters or default values.

Weaver uses next ways to resolve the determined argument:

The variadic argument is ignored by design. It will be able to change later.

Autowiring

When Weaver is resolving the argument which is an object it gets a service with a class name of the argument.

If the service is not registered than Weaver tries to register this service with the class name.

:warning: If the class name does not exist or there is an interface is specified than the exception will be thrown.

Next Weaver is instantiating this service via the workflow of the lazy instantiating.

PSR-11 compatibility

Weaver is compatible with PSR-11, so you can pass any string as an identifier of the service when you are getting or checking existence the service. But you cannot register the service with a random string as the identifier. The class name or interface is allowed.


All versions of weaver with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
psr/container Version ^1.0@dev
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 dispify/weaver contains the following files

Loading the files please wait ....