Download the PHP package yiisoft/proxy without Composer
On this page you can find all versions of the php package yiisoft/proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiisoft/proxy
More information about yiisoft/proxy
Files in yiisoft/proxy
Package proxy
Short Description proxy
License BSD-3-Clause
Homepage https://www.yiiframework.com/
Informations about the package proxy
Yii Proxy
The package is able to build generic proxy for a class i.e. it allows intercepting all class method calls. It's used in yii-debug package to collect service's method calls information.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through Сomposer.
Usage
Custom base proxy class
Custom base proxy class is useful to perform certain actions during each method call.
Additionally, you can customize new instance creation, etc. See examples in yii-debug extension.
Class with interface
Having an interface and class implementing it, the proxy can be created like this:
Class without interface
An interface is not required though, the proxy still can be created almost the same way:
Proxy class contents
Here is an example how proxy class looks internally:
Unit testing
The package is tested with PHPUnit. To run tests:
Mutation testing
The package tests are checked with Infection mutation framework. To run it:
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
Support the project
Follow updates
License
The Yiisoft Proxy is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.