MyGit
🚩收到GitHub仓库的更新通知

Ocramius/ProxyManager

Fork: 196 Star: 4940 (更新于 2024-05-09 05:52:27)

license: MIT

Language: PHP .

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

最后发布版本: 2.14.1 ( 2022-03-06 02:43:45)

GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

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 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-05-08 22:20:51)

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-05-17 23:51:20 symfony/var-dumper

2024-05-16 06:01:21 PHP-CS-Fixer/PHP-CS-Fixer

2024-05-15 04:34:29 doctrine/DoctrineMigrationsBundle

2024-05-13 18:00:52 snipe/snipe-it

2024-05-10 11:01:12 wp-graphql/wp-graphql

2024-05-10 00:12:03 andreaselia/laravel-api-to-postman