for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kunstmaan\FixturesBundle\Populator\Methods;
class Property implements MethodInterface
{
/**
* {@inheritdoc}
*/
public function canSet($object, $property, $value)
return property_exists($object, $property);
}
public function set($object, $property, $value)
$refl = new \ReflectionProperty($object, $property);
$refl->setAccessible(true);
$refl->setValue($object, $value);