Ocramius/ProxyManager
Fork: 187 Star: 4954 (更新于 2024-11-04 07:15:30)
license: MIT
Language: PHP .
🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects
最后发布版本: 2.14.1 ( 2022-03-06 02:43:45)
Proxy Manager
A message to Russian 🇷🇺 people
If you currently live in Russia, please read this message.
Purpose
This library aims to provide abstraction for generating various kinds of proxy classes.
Documentation
You can learn about the proxy pattern and how to use the ProxyManager in the docs.
ocramius/proxy-manager for enterprise
Available as part of the Tidelift Subscription.
The 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..
You can also contact the maintainer at ocramius@gmail.com for looking into issues related to this package in your private projects.
Installation
The suggested installation method is via composer:
php composer.phar require ocramius/proxy-manager
Proxy example
Here's how you build a lazy loadable object with ProxyManager using a Virtual Proxy
$factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory();
$proxy = $factory->createProxy(
\MyApp\HeavyComplexObject::class,
function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) {
$wrappedObject = new \MyApp\HeavyComplexObject(); // instantiation logic here
$initializer = null; // turning off further lazy initialization
return true; // report success
}
);
$proxy->doFoo();
See the documentation for more supported proxy types and examples.
最近版本更新:(数据更新于 2024-09-15 08:09:56)
2022-03-06 02:43:45 2.14.1
2022-03-06 02:42:41 2.13.1
2022-03-06 02:40:08 2.12.1
2022-03-06 02:39:05 2.11.2
2022-03-06 02:37:48 2.10.2
2022-03-06 02:36:31 2.9.2
2022-03-06 02:33:25 2.8.2
2022-03-06 02:30:58 2.7.2
2022-03-06 02:25:56 2.6.2
2022-03-06 02:24:38 2.5.3
主题(topics):
aop, lazy-loading, oop, proxy
Ocramius/ProxyManager同语言 PHP最近更新仓库
2024-11-01 18:37:36 schmittjoh/JMSSerializerBundle
2024-10-31 21:37:53 filamentphp/filament
2024-10-28 00:16:41 symfony/var-dumper
2024-10-28 00:11:41 symfony/symfony
2024-10-11 23:44:26 coollabsio/coolify
2024-10-11 03:27:29 odan/slim4-skeleton