{"id":18258068,"url":"https://github.com/guanhui07/facade","last_synced_at":"2026-03-06T02:45:21.165Z","repository":{"id":65148237,"uuid":"584037512","full_name":"guanhui07/facade","owner":"guanhui07","description":"facade、门面，借鉴laravel的门面，实现原理：__callStatic魔术方法","archived":false,"fork":false,"pushed_at":"2024-08-23T14:39:27.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T06:16:52.005Z","etag":null,"topics":["facade","laravel","php","static"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/guanhui07/facade","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/guanhui07.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}},"created_at":"2023-01-01T03:03:46.000Z","updated_at":"2024-08-23T14:39:30.000Z","dependencies_parsed_at":"2024-11-05T10:56:31.157Z","dependency_job_id":null,"html_url":"https://github.com/guanhui07/facade","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"c2ead7d21c976082fb932587265421287fb3adf5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/guanhui07/facade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanhui07%2Ffacade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanhui07%2Ffacade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanhui07%2Ffacade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanhui07%2Ffacade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guanhui07","download_url":"https://codeload.github.com/guanhui07/facade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanhui07%2Ffacade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"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":["facade","laravel","php","static"],"created_at":"2024-11-05T10:28:55.838Z","updated_at":"2026-03-06T02:45:21.148Z","avatar_url":"https://github.com/guanhui07.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 安装\n`composer require guanhui07/facade`\n\n## 用法\n```php\n$container = Container::instance();\nFacadeFactory::setContainer($container);\n```\n\n\n## 创建和使用外观\nFacade 应该是 AbstractFacade 的一个实例，并且应该提供一个访问器。\n\n访问者是服务标识符。它将用于获取容器中的服务.\n\n```php\nclass TestFacade extends AbstractFacade\n{\n\n    protected static function accessor()\n    {\n        return TestService::class;\n    }\n}\n```\n\n\n## 调用服务实例\n```php\n$service = TestFacade::instance();\n```\n\n### 调用服务方法\n```php\nTestFacade::someMethod();\n```\n\n\n或者\n```php\n$service = TestFacade::instance();\n$service-\u003esomeMethod();\n```\n\n## 我的其他包：\nhttps://github.com/guanhui07/dcr  借鉴Laravel实现的 PHP Framework ，FPM模式、websocket使用的workerman、支持容器、PHP8特性attributes实现了路由注解、中间件注解、Laravel Orm等特性\n\nhttps://github.com/guanhui07/redis Swoole模式下 Redis连接池\n\nhttps://github.com/guanhui07/facade  facade、门面 fpm模式下可使用\n\nhttps://github.com/guanhui07/dcr-swoole-crontab 基于swoole实现的crontab秒级定时任务\n\nhttps://github.com/guanhui07/database  基于 illuminate/database 做的连接池用于适配Swoole的协程环境\n\nhttps://github.com/guanhui07/dcr-swoole  高性能PHP Framework ，Cli模式，基于Swoole实现，常驻内存，协程框架，支持容器、切面、PHP8特性attributes实现了路由注解、中间件注解、支持Laravel Orm等特性\n\nhttps://github.com/guanhui07/open-ai  open-ai  chatgpt调用\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanhui07%2Ffacade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguanhui07%2Ffacade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanhui07%2Ffacade/lists"}