{"id":19258672,"url":"https://github.com/arikaim/container","last_synced_at":"2026-06-15T03:33:53.924Z","repository":{"id":56949764,"uuid":"113860335","full_name":"arikaim/container","owner":"arikaim","description":"Dependency Injection Container","archived":false,"fork":false,"pushed_at":"2023-12-09T11:52:39.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-11T02:04:32.037Z","etag":null,"topics":["arikaim","arikaim-cms","cms","container","dependency-injection","dependency-injection-container"],"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/arikaim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"arikaim","patreon":null,"open_collective":"arikaim-cms","ko_fi":"arikaim","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-12-11T13:09:00.000Z","updated_at":"2022-01-05T07:55:37.000Z","dependencies_parsed_at":"2025-01-05T09:26:22.254Z","dependency_job_id":"f00a5056-30f8-4509-a54c-58f9cb84a05a","html_url":"https://github.com/arikaim/container","commit_stats":{"total_commits":48,"total_committers":5,"mean_commits":9.6,"dds":"0.47916666666666663","last_synced_commit":"cab480896e78525156678e3729220a26ec2525ed"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/arikaim/container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikaim%2Fcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikaim%2Fcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikaim%2Fcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikaim%2Fcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arikaim","download_url":"https://codeload.github.com/arikaim/container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikaim%2Fcontainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34346867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["arikaim","arikaim-cms","cms","container","dependency-injection","dependency-injection-container"],"created_at":"2024-11-09T19:13:56.358Z","updated_at":"2026-06-15T03:33:53.908Z","avatar_url":"https://github.com/arikaim.png","language":"PHP","funding_links":["https://github.com/sponsors/arikaim","https://opencollective.com/arikaim-cms","https://ko-fi.com/arikaim"],"categories":[],"sub_categories":[],"readme":"## Arikaim Container\r\n![version: 1.0.0](https://img.shields.io/github/release/arikaim/container.svg)\r\n![license: MIT](https://img.shields.io/badge/License-MIT-blue.svg)\r\n\r\n\r\nMini Dependency Injection Container\r\n\r\nPSR-11 compatibility\r\n\r\n#### Installation\r\n\r\n```sh\r\n    composer require arikaim/container\r\n```\r\n\r\n#### Usage \r\n\r\n```php \r\n\r\nuse Arikaim\\Container\\Container;\r\n\r\n$container = new Container();\r\n\r\n```\r\n\r\n**Add service to container**\r\n\r\n```php \r\n\r\n$container['service'] = function() {\r\n    echo \"Service example\";\r\n};\r\n\r\n$container-\u003eadd('service_add',function() {\r\n    echo \"Service add example\";\r\n});\r\n\r\n\r\n$container-\u003eadd('date',function () {\r\n    return new \\DateTime();\r\n});\r\n\r\n\r\n$date = $container['date'];\r\necho $date-\u003eformat('Y-m-d');\r\n\r\n```\r\n**Add parameters** \r\n\r\n```php\r\n\r\n$container['config'] = \"Config value\";\r\n\r\n```\r\n\r\n**Replace service**  \r\n\r\n```php\r\n\r\n$container-\u003ereplace('service',function() {\r\n     echo \"Replace Service\";\r\n});\r\n\r\n```\r\n\r\n**Psr-11** compatibility implement the PSR-11 ContainerInterface\r\n\r\n```php\r\n$servcie = $container-\u003eget('service');\r\n\r\nif ($container-\u003ehas('service')) {\r\n    \\\\ Service exists\r\n}\r\n\r\n```\r\n\r\n#### License \r\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farikaim%2Fcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farikaim%2Fcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farikaim%2Fcontainer/lists"}