ProxyManager

OcramiusMIT活跃维护

PHP 的 OOP 代理生成库,能为对象自动生成代理类,用来实现延迟加载和面向切面编程等需求。

🎩✨🌈 OOP Proxy wrappers/utilities - generates and manages proxies of your objects

2.14.1发布于 2022-03-05 18:43 UTC4,938star191fork同步于 2026-11-10 11:36 UTC

怎么上手

README 里没有找到可直接复制的安装命令

README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。

硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本2.14.1
  1. 2.14.1最新正式版2022-03-05 · 2022-03-05 18:43 UTC

    Release Notes for 2.14.1

    2.14.1

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1
    enhancement
  2. 2.13.12022-03-05 · 2022-03-05 18:42 UTC
    查看更新说明

    Release Notes for 2.13.1

    2.13.1

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1
    enhancement
  3. 2.12.12022-03-05 · 2022-03-05 18:40 UTC
    查看更新说明

    Release Notes for 2.12.1

    2.12.1

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1
    enhancement
  4. 2.11.22022-03-05 · 2022-03-05 18:39 UTC
    查看更新说明

    Release Notes for 2.11.2

    2.11.2

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1
    enhancement
  5. 2.10.22022-03-05 · 2022-03-05 18:37 UTC
    查看更新说明

    Release Notes for 2.10.2

    2.10.2

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1
    enhancement

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.

    ProxyManager

    Mutation testing badge Type Coverage

    Total Downloads Latest Stable Version Latest Unstable Version

    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 [email protected] 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.