{"id":18996064,"url":"https://github.com/00f100/fcphp-provider","last_synced_at":"2026-04-16T08:30:20.725Z","repository":{"id":56894004,"uuid":"137004524","full_name":"00F100/fcphp-provider","owner":"00F100","description":"Package do manage providers. This package manupulate inject dependency. Have cache and autoloading composer packages.","archived":false,"fork":false,"pushed_at":"2018-08-04T19:25:49.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T16:26:33.369Z","etag":null,"topics":["autoload","autoloader","autoloading","cache","fcphp","fcphp-di","php7","provider"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/00F100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-12T02:12:30.000Z","updated_at":"2018-08-04T19:25:51.000Z","dependencies_parsed_at":"2022-08-21T01:20:23.426Z","dependency_job_id":null,"html_url":"https://github.com/00F100/fcphp-provider","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/00F100","download_url":"https://codeload.github.com/00F100/fcphp-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240010504,"owners_count":19733514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoload","autoloader","autoloading","cache","fcphp","fcphp-di","php7","provider"],"created_at":"2024-11-08T17:33:48.723Z","updated_at":"2026-04-16T08:30:20.692Z","avatar_url":"https://github.com/00F100.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FcPHP Provider\n\nPackage do manage providers. This package use [FcPhp Di](https://github.com/00f100/fcphp-di) to inject dependency.\n\n[![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)\n\n## How to install\n\nComposer:\n```sh\n$ composer require 00f100/fcphp-provider\n```\n\nor composer.json\n```json\n{\n    \"require\": {\n        \"00f100/fcphp-provider\": \"*\"\n    }\n}\n```\n\n## How to use\n\n#### Create class extends `IProviderClient` to inject dependencies of your application\n```php\n\u003c?php\n\nnamespace Some\\Example\n{\n    use FcPhp\\Di\\Interfaces\\IDi;\n    use FcPhp\\Provider\\Interfaces\\IProviderClient;\n\n    class ProviderClientExample implements IProviderClient\n    {\n        /**\n         * Method to configure Di in providers\n         *\n         * @param FcPhp\\Di\\Interfaces\\IDi $di Di Instance\n         * @return void\n         */\n        public function getProviders(IDi $di) :IDi\n        {\n            $di-\u003eset('Class', '\\Class', [], ['SetConfiguration', =\u003e ['item1', 'item2', 'item3']]);\n            $di-\u003eset('Class2', '\\Class', ['instance' =\u003e $this-\u003eget('Class')]);\n            return $di;\n        }\n    }\n}\n```\n\n#### Create new instance of IProvider to process providers\n```php\n\u003c?php\n\nuse FcPhp\\Di\\Facades\\DiFacade;\nuse FcPhp\\Provider\\Facades\\ProviderFacade;\n\n$PathCache = 'tests/var/cache';\n$pathToAutoload = 'tests/*/*/config';\n\n$provider = ProviderFacade::getInstance($pathToAutoload, $PathCache);\n$di = DiFacade::getInstance();\n\n// Add new provider to process\n$provider-\u003eaddProviders(['Some\\Example\\ProviderClientExample']);\n\n// Execute ...\n$provider-\u003emake();\n\n// Now instance of di have configuration ...\n$di-\u003emake('Class2'); // Return new \\Class(new \\Class()) ....\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F00f100%2Ffcphp-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-provider/lists"}