Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/00f100/fcphp-provider
Package do manage providers. This package manupulate inject dependency. Have cache and autoloading composer packages.
https://github.com/00f100/fcphp-provider
autoload autoloader autoloading cache fcphp fcphp-di php7 provider
Last synced: 5 days ago
JSON representation
Package do manage providers. This package manupulate inject dependency. Have cache and autoloading composer packages.
- Host: GitHub
- URL: https://github.com/00f100/fcphp-provider
- Owner: 00F100
- License: mit
- Created: 2018-06-12T02:12:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-04T19:25:49.000Z (over 6 years ago)
- Last Synced: 2024-12-09T07:48:13.544Z (29 days ago)
- Topics: autoload, autoloader, autoloading, cache, fcphp, fcphp-di, php7, provider
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FcPHP Provider
Package do manage providers. This package use [FcPhp Di](https://github.com/00f100/fcphp-di) to inject dependency.
[![Build Status](https://travis-ci.org/00F100/fcphp-provider.svg?branch=master)](https://travis-ci.org/00F100/fcphp-provider) [![codecov](https://codecov.io/gh/00F100/fcphp-provider/branch/master/graph/badge.svg)](https://codecov.io/gh/00F100/fcphp-provider) [![Total Downloads](https://poser.pugx.org/00F100/fcphp-provider/downloads)](https://packagist.org/packages/00F100/fcphp-provider)
## How to install
Composer:
```sh
$ composer require 00f100/fcphp-provider
```or composer.json
```json
{
"require": {
"00f100/fcphp-provider": "*"
}
}
```## How to use
#### Create class extends `IProviderClient` to inject dependencies of your application
```php
set('Class', '\Class', [], ['SetConfiguration', => ['item1', 'item2', 'item3']]);
$di->set('Class2', '\Class', ['instance' => $this->get('Class')]);
return $di;
}
}
}
```#### Create new instance of IProvider to process providers
```php
addProviders(['Some\Example\ProviderClientExample']);// Execute ...
$provider->make();// Now instance of di have configuration ...
$di->make('Class2'); // Return new \Class(new \Class()) ....
```