php private access
3.0.0
객체의 개인 속성에 액세스하기위한 작은 간단한 라이브러리. 실제로 유용한 도구보다 Mad Skillz의 예입니다. 반사 API 호출이 없습니다!
작곡가 사용 :
composer require arokettu/private-access --dev
이 네 가지 간단한 기능은 psysh와 같은 것을위한 도우미로 편리 할 수 있습니다.
get_private_field()set_private_field()call_private_method()get_private_const() <?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; 여기에서 전체 문서를 읽으십시오 : https://sandfox.dev/php/private-access.html
또한 문서 읽기 : https://php-private-access.readthedocs.io/
gitlab : https://gitlab.com/sandfox/php-private-access/-/issues의 메인 repo에 문제를 제출하십시오.
라이브러리는 MIT 라이센스의 조건에 따라 오픈 소스로 제공됩니다.