Returns a protected property from a class instance.
object $instance: The class instance to return the property from.
string $property: The name of the property to return.
mixed The instance property value.
protected function getProtectedProperty($instance, $property) {
$reflection = new \ReflectionProperty($instance, $property);
$reflection
->setAccessible(TRUE);
return $reflection
->getValue($instance);
}