createFromInstance() публичный статический Метод

Create a reflection of an instance's property by it's name
public static createFromInstance ( object $instance, string $propertyName ) : BetterReflection\Reflection\ReflectionMethod
$instance object
$propertyName string
Результат BetterReflection\Reflection\ReflectionMethod
 public function testCreateFromInstance()
 {
     $property = ReflectionProperty::createFromInstance(new ClassForHinting(), 'someProperty');
     $this->assertInstanceOf(ReflectionProperty::class, $property);
     $this->assertSame('someProperty', $property->getName());
 }