{"id":20756378,"url":"https://github.com/pixelpluginhq/wp-container-api","last_synced_at":"2026-05-07T06:39:58.146Z","repository":{"id":204343726,"uuid":"711113847","full_name":"pixelpluginhq/wp-container-api","owner":"pixelpluginhq","description":"WordPress Container API","archived":false,"fork":false,"pushed_at":"2023-11-13T23:47:44.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T18:47:35.444Z","etag":null,"topics":["composer","container","container-interface","dependency-injection","php","psr","psr-11","wordpress"],"latest_commit_sha":null,"homepage":"https://pixelplugin.com","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/pixelpluginhq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-28T08:56:57.000Z","updated_at":"2023-10-31T15:24:59.000Z","dependencies_parsed_at":"2024-11-17T09:32:12.831Z","dependency_job_id":"2c74b5d2-1159-4879-b656-696d91b30dd4","html_url":"https://github.com/pixelpluginhq/wp-container-api","commit_stats":null,"previous_names":["pixelpluginhq/wp-container-api"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/pixelpluginhq/wp-container-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelpluginhq%2Fwp-container-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelpluginhq%2Fwp-container-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelpluginhq%2Fwp-container-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelpluginhq%2Fwp-container-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelpluginhq","download_url":"https://codeload.github.com/pixelpluginhq/wp-container-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelpluginhq%2Fwp-container-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32726665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["composer","container","container-interface","dependency-injection","php","psr","psr-11","wordpress"],"created_at":"2024-11-17T09:32:01.713Z","updated_at":"2026-05-07T06:39:58.129Z","avatar_url":"https://github.com/pixelpluginhq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Container API\n\n`pixelplugin/wp-container-api` is a composer package that provides global functions\nfor working with a global dependency container in WordPress.\n\n## Installation\n\n```shell\ncomposer require pixelplugin/wp-container-api\n```\n\nhttps://packagist.org/packages/pixelplugin/wp-container-api\n\n## Usage\n\nYou need this package and some WordPress plugin that provides a global PSR-compatible container instance in `$wp_container` variable, for example [pixelplugin/wp-container](https://github.com/pixelpluginhq/wp-container). Then you can use the following functions to work with the container from your code.\n\n## Functions\n\n### wp_container_get\n\n`wp_container_get(string $id): mixed` is used to get a value from the global container instance.\n\n```php\n$value = wp_container_get(ClassName::class);\n```\n\n### wp_container_has\n\n`wp_container_has(string $id): bool` checks if a value exists in the global container instance.\n\n```php\nif (wp_container_has(ClassName::class)) {\n    // ClassName exists in the container.\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelpluginhq%2Fwp-container-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelpluginhq%2Fwp-container-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelpluginhq%2Fwp-container-api/lists"}