定制 arokettu/private-access 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arokettu/private-access

最新稳定版本:3.0.0

Composer 安装命令:

composer require --dev arokettu/private-access

包简介

Simple and fast methods to read private properties and call private methods

关键字:

README 文档

README

Packagist License Gitlab pipeline status

A small simple library to access private properties of the objects. Actually it's more an example of mad skillz than a useful tool. No Reflection API calls!

Installation

Use composer:

composer require arokettu/private-access --dev

Usage

These four simple functions can come in handy as helpers for something like PsySH

  • get_private_field()
  • set_private_field()
  • call_private_method()
  • get_private_const()

Example

<?php

class X {
    private $field = 123;
}

$x = new X();

var_dump(\Arokettu\Debug\get_private_field($x, 'field')); // 123
\Arokettu\Debug\set_private_field($x, 'field', 321); // $x->field = 321;

Documentation

Read full documentation here: https://sandfox.dev/php/private-access.html

Also on Read the Docs: https://php-private-access.readthedocs.io/

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/php-private-access/-/issues

License

The library is available as open source under the terms of the MIT License.

统计信息

  • 总下载量: 5.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-14