Assigner une propriétée

@param string $method
@param string $property
@param $value
321563
private function assignProperty(string $method, string $property, $value)
    {
        $mutatorMethod = $method.'Attribute';

        // on prépare la valeur à sauvegarder dans la BDD
        if (method_exists($this, $mutatorMethod)) {
            $this->toSave[$property] = $this->$mutatorMethod($value);
        } else {
            $this->toSave[$property] = $value;
        }

        // on assigne la valeur à la propriétée
        $this->$property = $this->toSave[$property];
    }
950718
public function set($property, $value)
    {
        $defaultCurrentValue = [];
        $data = $this->session->get($this->_name, $defaultCurrentValue);
        $data[$property] = $value;

        $this->session->set($this->_name, $data);
    }
282719
public void setProperty(Object object, String property, Object newValue) {
        delegate.setProperty(object, property, newValue);
    }
535559
public function set($property, $value)
    {
        if($property == 'module')
        {
            $value = clone $value;

            if(is_string($value->params)) {
                $value->params = $this->getObject('object.config.factory')->fromString('json', $value->params);
            }
        }

        parent::set($property, $value);
    }
47973
public function setProperty(&$object, $propertyName, $propertyValue)
    {
        $property = $this->getPropertyInstance($object, $propertyName);
        $property->setAccessible(true);
        $property->setValue($object, $propertyValue);
    }
454573
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);
            }
        }
    }
671983
public static function toPropertyValue($obj,$propertyName,$value)
    {
        if(property_exists($obj, $propertyName)){
            $obj->$propertyName=$value;
        }
    }
253714
public function setProperty($key, $value = null){
		if($key instanceof Property){
			$value	= $key;
			$key	= $key->getName();
		}elseif(!$value instanceof Property){
			$value	= new Property($key, $value);
		}
		
		foreach($this->properties as $index=>$property){
			if($property->getName() == $key){
				unset($this->properties[$index]);
			}
		}
		
		$this->properties[] = $value;
		return $this;
	}
244259
public static void setProperty(Object bean, String propertyName, Object value)
   {
	   setProperty(bean,propertyName,value,true);
   }
256538
protected function setValue($object, $property, $value)
    {
        $reflectionClass = new ReflectionClass($object);

        if (!$reflectionClass->hasProperty($property)) {
            $object->{$property} = $value;

            return;
        }

        $reflectionProperty = $reflectionClass->getProperty($property);
        $reflectionProperty->setAccessible(true);

        $reflectionProperty->setValue($object, $value);
    }
466970
protected function assignPropertyValues(array $values)
    {
        foreach ($values as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
    }
561001
public function withProperty(string $property, $value): self
    {
        return new self(
            $this->class,
            $this->properties->put($property, $value),
            $this->injectionStrategy,
            $this->instanciator
        );
    }
329312
public function set($property, $value = null)
    {
        if (is_array($property)) {
            foreach ($property as $k => $v) {
                $this->set($k, $v);
            }

            return $this;
        }

        if ($this->has($property)) {
            $method = 'set' . Str::studly($property);
            $value  = $this->sanitizeSetterValue($method, $value);

            $this->message->{$method}($value);
        }

        return $this;
    }
457765
public static function setPropertyValue($object, string $property, $value, $scope = 'static')
    {
        $setPropertyValue = function ($value) use ($object, $property) {
            if (is_object($object)) {
                $object->$property = $value;
            } else {
                $object::$$property = $value;
            }
        };
        $setPropertyValue = $setPropertyValue->bindTo(is_object($object) ? $object : null, $scope);
        $setPropertyValue($value);
    }
811348
public function findObject($property, $value) {
        foreach ($this as $object) {
            if (property_exists($object, $property)) {
                if ($value === $object->$property)
                    return $object;
            }
        }
    }
972028
public function set($property, $value)
    {
        switch ($property) {
            case 'code':
                $this->_code = $value;
            break;
            case 'data':
                $this->_data = $value;
            break;
            case 'headers':
                $this->_headers = $value;
            break;
            default:
                throw new HarvestException(sprintf('Unknown property %s::%s', get_class($this), $property));
            break;
        }
    }
1340425
public static function setValueInEntity($entity, $property, $value)
    {
        $setter = self::createSetter($entity, $property);
        $entity->$setter($value);
    }