public function setAnyPropertyValue($name, $value, $object = null)
    {
        $property = $this->getProperty($name);
        $property->setAccessible(true);
        $property->setValue($this->getObject($object), $value);

        return $this;
    }
public function setAnyPropertyValue($name, $value, $object = null)
    {
        $property = $this->getProperty($name);
        $property->setAccessible(true);
        $property->setValue($this->getObject($object), $value);

        return $this;
    }
public function setAnyPropertyValue ( $ name , $ value , $ object = null ) { $ property = $ this -> getProperty ( $ name ) ; $ property -> setAccessible ( true ) ; $ property -> setValue ( $ this -> getObject ( $ object ) , $ value ) ; return $ this ; }
Set property value in any case, if the property is not accessible, it will change the accessibility and restore
it before return.

@param string      $name
@param mixed       $value  The new value to set
@param object|null $object If object was not given at construction time, it needs to be passed here

@return ReflClass
Set property value in any case if the property is not accessible it will change the accessibility and restore it before return .