| 1 |
<?php |
| 2 |
|
| 3 |
namespace Wikimedia\Tests\Reflection; |
| 4 |
|
| 5 |
use Wikimedia\Reflection\GhostFieldAccessTrait; |
| 6 |
use Wikimedia\Reflection\GhostFieldTestClass as OldGhostFieldTestClass; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#[\AllowDynamicProperties] |
| 15 |
class GhostFieldTestClass { |
| 16 |
use GhostFieldAccessTrait; |
| 17 |
|
| 18 |
public function getPrivateField() { |
| 19 |
return $this->getGhostFieldValue( 'privateField', OldGhostFieldTestClass::class ); |
| 20 |
} |
| 21 |
|
| 22 |
public function getProtectedField() { |
| 23 |
return $this->getGhostFieldValue( 'protectedField' ); |
| 24 |
} |
| 25 |
|
| 26 |
public function getPublicField() { |
| 27 |
return $this->getGhostFieldValue( 'publicField' ); |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
class_alias( GhostFieldTestClass::class, 'Wikimedia\\Reflection\\GhostFieldTestClass' ); |