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: 2 months 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-04T19:25:49.000Z (almost 8 years ago)
- Last Synced: 2025-01-01T16:26:33.369Z (over 1 year 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.
[](https://travis-ci.org/00F100/fcphp-provider) [](https://codecov.io/gh/00F100/fcphp-provider) [](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()) ....
```