private function setValue($object, \ReflectionProperty $property, $value)
    {
        if ($property->isPublic()) {
            $property->setValue($object, $value);
        } else {
            // Try to use mutator if property is not public
            $mutatorName = $this->formatter->getPhpMutator($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($mutatorName);

            if (null !== $reflectedMethod) {
                $reflectedMethod->invoke($object, $value);
            }
        }
    }
private function setValue($object, \ReflectionProperty $property, $value)
    {
        if ($property->isPublic()) {
            $property->setValue($object, $value);
        } else {
            // Try to use mutator if property is not public
            $mutatorName = $this->formatter->getPhpMutator($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($mutatorName);

            if (null !== $reflectedMethod) {
                $reflectedMethod->invoke($object, $value);
            }
        }
    }
private function setValue ( $ object , \ ReflectionProperty $ property , $ value ) { if ( $ property -> isPublic ( ) ) { $ property -> setValue ( $ object , $ value ) ; } else { // Try to use mutator if property is not public $ mutatorName = $ this -> formatter -> getPhpMutator ( $ property -> getName ( ) , false ) ; $ reflectedObject = new \ ReflectionObject ( $ object ) ; $ reflectedMethod = $ reflectedObject -> getMethod ( $ mutatorName ) ; if ( null !== $ reflectedMethod ) { $ reflectedMethod -> invoke ( $ object , $ value ) ; } } }
Define a value for an object property

@param mixed               $object
@param \ReflectionProperty $property
@param mixed               $value
Define a value for an object property