Download the PHP package nayjest/di-hub without Composer

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

DI-Hub (Dependency Injection Hub)

IoC container for PHP with hierarchy and links consistency maintaining mechanism

Build Status

SensioLabsInsight

Table of Contents

Requirements

Installation

The recommended way of installing this package is through Composer.

Run following command from your project folder:

Usage

Creating hub

Class Nayjest\DI\Hub represents IoC container. This class implements ContainerInterface from container-interop/container-interop package.

Hub can be instantiated without arguments or with array containing definitions.

Definitions

There are several types of definitions that can be added to hub:

Definitions should implement Nayjest\DI\Definition\DefinitionInterface. This intarface don't contains any methods, it's used only to signalize that instances of target class defines data or relations inside container.

Definitions can be added to container(hub) in following ways: 1) Inject array of definition instances into hub constructor 2) Add definition instance to existing hub via $hub->addDefinition(DefinitionInterface $definition) 3) Add array of definition instances to existing hub via $hub->addDefinitions(DefinitionInterface[] $definitions) 4) Create definitions via DefinitionBuilder: $hub->builder()->define($id $source)

Value Definitions

Instance of Nayjest\DI\Definition\Value represent single value in container that can be accessed by it's id. Nayjest\DI\Definition\Value accepts two arguments: id and source. source can contain value to store inside hub or callable that returns target value.

Relation Definitions

@todo

Item Definitions

Item is a combination of value & it's initial dependencies. May be useful to store class instances that require DI in constructor.

@todo

Hierarchy of hubs

@todo

Testing

This package bundled with unit tests (PHPUnit).

1) Install nayjest/di-hub as stand-alone project

2) Run tests from package folder

Also it's possible to check code style (PSR-2):

Contributing

Please see Code of Conduct for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

© 2016—2017 Vitalii Stepanenko

Licensed under the MIT License.

Please see License File for more information.


All versions of di-hub with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5||^7
container-interop/container-interop Version ^1.1
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 nayjest/di-hub contains the following files

Loading the files please wait ....