Your IP : 3.129.210.35


Current Path : /home/lentoinv/api.lentoria.com/vendor/myclabs/deep-copy/src/DeepCopy/Filter/
Upload File :
Current File : //home/lentoinv/api.lentoria.com/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php

<?php

namespace DeepCopy\Filter;

use DeepCopy\Reflection\ReflectionHelper;

/**
 * @final
 */
class SetNullFilter implements Filter
{
    /**
     * Sets the object property to null.
     *
     * {@inheritdoc}
     */
    public function apply($object, $property, $objectCopier)
    {
        $reflectionProperty = ReflectionHelper::getProperty($object, $property);

        $reflectionProperty->setAccessible(true);
        $reflectionProperty->setValue($object, null);
    }
}

?>