{"id":13562936,"url":"https://github.com/Ocramius/ProxyManager","last_synced_at":"2025-04-03T19:31:54.549Z","repository":{"id":7524070,"uuid":"8875190","full_name":"Ocramius/ProxyManager","owner":"Ocramius","description":"🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects","archived":false,"fork":false,"pushed_at":"2024-10-28T13:29:11.000Z","size":4660,"stargazers_count":4958,"open_issues_count":50,"forks_count":187,"subscribers_count":48,"default_branch":"2.15.x","last_synced_at":"2024-10-29T19:21:07.745Z","etag":null,"topics":["aop","lazy-loading","oop","proxy"],"latest_commit_sha":null,"homepage":"","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/Ocramius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Ocramius"]}},"created_at":"2013-03-19T09:43:22.000Z","updated_at":"2024-10-28T08:21:12.000Z","dependencies_parsed_at":"2023-02-16T06:30:35.270Z","dependency_job_id":"d1397af6-a22b-4ae7-b2ee-08ce6ba0b5ad","html_url":"https://github.com/Ocramius/ProxyManager","commit_stats":{"total_commits":2601,"total_committers":59,"mean_commits":44.08474576271186,"dds":"0.20453671664744333","last_synced_commit":"04e124d526b8c513ec7afa0e8b063984a719d20b"},"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FProxyManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FProxyManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FProxyManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ocramius%2FProxyManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ocramius","download_url":"https://codeload.github.com/Ocramius/ProxyManager/tar.gz/refs/heads/2.15.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222113765,"owners_count":16933711,"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":["aop","lazy-loading","oop","proxy"],"created_at":"2024-08-01T13:01:13.591Z","updated_at":"2024-11-04T15:31:20.966Z","avatar_url":"https://github.com/Ocramius.png","language":"PHP","readme":"# Proxy Manager\n\n## A message to Russian 🇷🇺 people\n\nIf you currently live in Russia, please read [this message](./ToRussianPeople.md).\n\n## Purpose\n\nThis library aims to provide abstraction for generating various kinds of \n  [proxy classes](http://ocramius.github.io/presentations/proxy-pattern-in-php/).\n\n![ProxyManager](https://raw.githubusercontent.com/Ocramius/ProxyManager/917bf1698243a1079aaa27ed8ea08c2aef09f4cb/proxy-manager.png)\n\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FOcramius%2FProxyManager%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/Ocramius/ProxyManager/master)\n[![Type Coverage](https://shepherd.dev/github/Ocramius/ProxyManager/coverage.svg)](https://shepherd.dev/github/Ocramius/ProxyManager)\n\n[![Total Downloads](https://poser.pugx.org/ocramius/proxy-manager/downloads.png)](https://packagist.org/packages/ocramius/proxy-manager)\n[![Latest Stable Version](https://poser.pugx.org/ocramius/proxy-manager/v/stable.png)](https://packagist.org/packages/ocramius/proxy-manager)\n[![Latest Unstable Version](https://poser.pugx.org/ocramius/proxy-manager/v/unstable.png)](https://packagist.org/packages/ocramius/proxy-manager)\n\n\n## Documentation\n\nYou can learn about the proxy pattern and how to use the **ProxyManager** in the [docs](docs).\n\n## ocramius/proxy-manager for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainer of ocramius/proxy-manager and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-ocramius-proxy-manager?utm_source=packagist-ocramius-proxy-manager\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo).\n\nYou can also contact the maintainer at ocramius@gmail.com for looking into issues related to this package\nin your private projects.\n\n## Installation\n\nThe suggested installation method is via [composer](https://getcomposer.org/):\n\n```sh\nphp composer.phar require ocramius/proxy-manager\n```\n\n## Proxy example\n\nHere's how you build a lazy loadable object with ProxyManager using a *Virtual Proxy*\n\n```php\n$factory = new \\ProxyManager\\Factory\\LazyLoadingValueHolderFactory();\n\n$proxy = $factory-\u003ecreateProxy(\n    \\MyApp\\HeavyComplexObject::class,\n    function (\u0026 $wrappedObject, $proxy, $method, $parameters, \u0026 $initializer) {\n        $wrappedObject = new \\MyApp\\HeavyComplexObject(); // instantiation logic here\n        $initializer   = null; // turning off further lazy initialization\n\n        return true; // report success\n    }\n);\n\n$proxy-\u003edoFoo();\n```\n\nSee the [documentation](docs) for more supported proxy types and examples. \n","funding_links":["https://github.com/sponsors/Ocramius","https://tidelift.com/subscription/pkg/packagist-ocramius-proxy-manager?utm_source=packagist-ocramius-proxy-manager\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["PHP","数据库","目录","Table of Contents","数据库 Database","ORM and Datamapping","Database","数据库( Database )"],"sub_categories":["数据库 Database","Database"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOcramius%2FProxyManager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOcramius%2FProxyManager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOcramius%2FProxyManager/lists"}