One class package for calling protected and private methods without reflection

1.0.1 2018-06-15 19:27 UTC

This package is auto-updated.

Last update: 2024-06-19 08:57:45 UTC


Tiny package that allows direct access to any protected or private method of an object without reflection. For example for testing.


The best way is to install this package via composer:

composer require m0rtis/picklock

How to use

It is very simple:

m0rtis\Picklock\Picklock::callMethod(object $object, string $methodName, [$argementOne[, $argumentTwo, ...]]);

$object - The object whose method you want to call

$methodName - Name of the method you want to call

$arguments - Any arguments you need to call your method


We use SemVer for versioning. For the versions available, see the tags on this repository.


Anton Fomichev aka m0rtis - mail@m0rtis.ru


This project is licensed under the Apache 2.0 license - see the LICENSE file for details