定制 johnpbloch/invade 二次开发

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

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

johnpbloch/invade

最新稳定版本:v1.0.0

Composer 安装命令:

composer require johnpbloch/invade

包简介

A copy of the invade function from Livewire

README 文档

README

Invade is a utility library shamelessly stolen from Livewire for Laravel. Using invade(), you can easily access all private and protected properties and methods of a class. This is nothing revolutionary or complicated, but it is terribly convenient. I created this as its own package for two reasons:

  1. I wanted to be able to require this function as a dev dependency, since I don't love the idea of this function being available in non-dev installations
  2. I wanted to use it in non-Laravel codebases

Installation

composer require --dev johnpbloch/invade

Usage

# supposing there is a class like this: class StateManager { private $dataYouAreDebugging = []; /* ... */ } # and supposing you have an instance of StateManager and you need to see that data: /** @var StateManager $instance */ \var_dump(\invade($instance)->dataYouAreDebugging);

invade() will also give you the ability to set non-public properties and to call non-public methods.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固