2017 © Pedro Peláez
 

library private-access

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

image

sandfoxme/private-access

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

  • Tuesday, May 29, 2018
  • by sandfox.me
  • Repository
  • 1 Watchers
  • 1 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 10 % Grown

The README.md

PHP Private Access

Packagist License Gitlab pipeline status, (*1)

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!, (*2)

Installation

Use composer:, (*3)

composer require arokettu/private-access --dev

Usage

These four simple functions can come in handy as helpers for something like PsySH, (*4)

  • 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, (*5)

Also on Read the Docs: https://php-private-access.readthedocs.io/, (*6)

Support

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

License

The library is available as open source under the terms of the MIT License., (*8)

The Versions

29/05 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >= 5.4.6

 

The Development Requires

29/05 2018

1.2.0

1.2.0.0

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

  Sources   Download

MIT

The Requires

  • php >= 5.4.6

 

The Development Requires

07/12 2016

1.1.0

1.1.0.0

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

  Sources   Download

MIT

The Requires

  • php >= 5.4

 

The Development Requires

16/11 2016

1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

  • php >= 5.4

 

The Development Requires