{"id":23219103,"url":"https://github.com/b2pweb/bdf-instantiator","last_synced_at":"2026-01-29T21:05:10.666Z","repository":{"id":62490847,"uuid":"228413873","full_name":"b2pweb/bdf-instantiator","owner":"b2pweb","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-11T10:49:49.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T11:27:38.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/b2pweb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-16T15:11:15.000Z","updated_at":"2025-12-11T10:49:40.000Z","dependencies_parsed_at":"2025-08-19T08:32:46.742Z","dependency_job_id":"861449a9-bc69-48c1-a2da-e63a207a42b2","html_url":"https://github.com/b2pweb/bdf-instantiator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/b2pweb/bdf-instantiator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2pweb%2Fbdf-instantiator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2pweb%2Fbdf-instantiator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2pweb%2Fbdf-instantiator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2pweb%2Fbdf-instantiator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b2pweb","download_url":"https://codeload.github.com/b2pweb/bdf-instantiator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2pweb%2Fbdf-instantiator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-12-18T21:19:18.203Z","updated_at":"2026-01-29T21:05:10.643Z","avatar_url":"https://github.com/b2pweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B2PWeb Instantiator\n\nA basic object instantiator.\n\n[![build](https://github.com/b2pweb/bdf-instantiator/actions/workflows/php.yml/badge.svg)](https://github.com/b2pweb/bdf-instantiator/actions/workflows/php.yml)\n[![codecov](https://codecov.io/github/b2pweb/bdf-instantiator/branch/master/graph/badge.svg?token=VOFSPEWYKX)](https://app.codecov.io/github/b2pweb/bdf-instantiator)\n[![Packagist Version](https://img.shields.io/packagist/v/b2pweb/bdf-instantiator.svg)](https://packagist.org/packages/b2pweb/bdf-instantiator)\n[![Total Downloads](https://img.shields.io/packagist/dt/b2pweb/bdf-instantiator.svg)](https://packagist.org/packages/b2pweb/bdf-instantiator)\n\n## Install via composer\n```bash\n$ composer require b2pweb/bdf-instantiator\n```\n\n## Usage Instruction\n\nBasic usage when resolving from container definition.\n\n```PHP\nuse Bdf\\Instantiator\\Instantiator;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\n/** @var ContainerInterface $container */\n$container-\u003eadd(Logger::class, LoggerInterface::class);\n\n$instantiator = new Instantiator($container);\n$instantiator-\u003emake(LoggerInterface::class);\n```\n\nThe instantiator resolve the dependencies of a method based on container definitions.\n\n```PHP\nuse Bdf\\Instantiator\\Instantiator;\nuse Psr\\Container\\ContainerInterface;\nuse Psr\\Log\\LoggerInterface;\n\nclass Foo\n{\n    public $logger;\n    \n    /**\n     * Foo constructor.\n     * \n     * @param LoggerInterface $logger  \n     */\n    public function __construct(LoggerInterface $logger)\n    {\n        $this-\u003elogger = $logger;\n    }\n}\n\n/** @var ContainerInterface $container */\n$container-\u003eadd(Logger::class, LoggerInterface::class);\n\n$instantiator = new Instantiator($container);\n$foo = $instantiator-\u003emake(Foo::class);\n\nvar_dump($foo-\u003elogger); // Logger\n```\n\n## License\n\nDistributed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2pweb%2Fbdf-instantiator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb2pweb%2Fbdf-instantiator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2pweb%2Fbdf-instantiator/lists"}