There is a class encrypted ioncube (let's call class A). When using it, this class was inherited (class B), overriding the public method. The source data has now changed, and you need to change the private property of class A. To change the private property of an object, it found https://3v4l.org/nCMor (description https://habrahabr.ru/post/186718/ ), but how to get to private property of the parent class? If I use class A directly, the property is updated without problems (using the method above), but how to overload the required method in the created instance? I watched the reflection, but did not understand how to do it. Example:
<?php class A { //зашифрованный private $field = array('field1', 'field2'); public function getNameTable(){ return 'Table1'; } /*...... разные методы ......*/ } class B extends A{ public function getNameTable(){ return 'Table2'; } }
It is necessary to add another 1 'field3' element to the $ field array, but the table 'Table2' should be used.
P.S. I contacted the developer of class A, he said that he no longer does this, and he no longer has the source code.