{"id":23255035,"url":"https://github.com/dugajean/pouch","last_synced_at":"2025-07-05T18:33:24.495Z","repository":{"id":56973127,"uuid":"69561645","full_name":"dugajean/pouch","owner":"dugajean","description":"Tiny IoC container with awesome autowiring \u0026 more - for your PHP project.","archived":false,"fork":false,"pushed_at":"2019-08-20T07:12:17.000Z","size":400,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-04T22:37:50.274Z","etag":null,"topics":["container-interop","dependency-injection","ioc","ioc-container","php","pouch","psr-11"],"latest_commit_sha":null,"homepage":"http://api.pouch.dukagj.in","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/dugajean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-09-29T11:35:47.000Z","updated_at":"2022-07-31T08:05:31.000Z","dependencies_parsed_at":"2022-08-21T10:20:13.939Z","dependency_job_id":null,"html_url":"https://github.com/dugajean/pouch","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dugajean/pouch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dugajean%2Fpouch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dugajean%2Fpouch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dugajean%2Fpouch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dugajean%2Fpouch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dugajean","download_url":"https://codeload.github.com/dugajean/pouch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dugajean%2Fpouch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263784896,"owners_count":23510993,"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":["container-interop","dependency-injection","ioc","ioc-container","php","pouch","psr-11"],"created_at":"2024-12-19T11:18:22.363Z","updated_at":"2025-07-05T18:33:24.451Z","avatar_url":"https://github.com/dugajean.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pouch\n\n[![Build Status](https://travis-ci.org/dugajean/pouch.svg?branch=master)](https://travis-ci.org/dugajean/pouch) \n[![Latest Stable Version](https://poser.pugx.org/dugajean/pouch/v/stable)](https://packagist.org/packages/dugajean/pouch) \n[![Total Downloads](https://poser.pugx.org/dugajean/pouch/downloads)](https://packagist.org/packages/dugajean/pouch) \n[![License](https://poser.pugx.org/dugajean/pouch/license)](https://packagist.org/packages/dugajean/pouch) \n\nTiny IoC container with awesome autowiring \u0026 more - for your PHP project.\n\n## Requirements\n\n- PHP 7.1+\n- [PSR-4 standard with Composer](https://getcomposer.org/doc/04-schema.md#psr-4)\n\n## Install\n\nVia Composer\n\n```bash\n$ composer require dugajean/pouch\n```\n\n## Usage\n\nYou may register your whole `src/` folder with this package in order to enable automatic resolution everywhere within the namespace\n\n```php\n\u003c?php\n\nuse Pouch\\Pouch;\n\nPouch::bootstrap(__DIR__);\n\n// ...\n\npouch()-\u003eregisterNamespaces('Foo'); // Foo corresponds to src/\n```\n\nYou may now just typehint to the objects your method requires and it will be automatically resolved for you.\n\n```php\n\u003c?php\n\nnamespace Foo;\n\nclass Bar\n{\n    public function doSomething(Baz $baz)\n    {\n        $baz-\u003edoSomethingElse();\n    }\n}\n\nclass Baz\n{\n    public function doSomethingElse()\n    {\n        echo 'From Baz!';\n    }\n}\n```\n\nConstructor object arguments will also be automatically injected.\n\nYou can always manually bind data to the container using `pouch()-\u003ebind($key, $dataClosure)` and also resolve anything from the container using `pouch()-\u003eget($key)`.\n\n**Read the [wiki](https://github.com/dugajean/pouch/wiki) and the [API docs](https://dugajean.github.io/pouch/) for further information.**\n\n## Testing\n\n```bash\n$ vendor/bin/phpunit\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## License\nPouch is released under [the MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdugajean%2Fpouch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdugajean%2Fpouch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdugajean%2Fpouch/lists"}