Set the list of a values to the data

@param  string $property
@param  mixed  $data
@param  mixed  $primary
@param  bool   $overwrite
@return Collection
195759
public function setList($property, $data, $primary = null, $overwrite = true) {
		if ($primary !== true && (is_array($data) || $data instanceof Collection)) {
			if ($primary === null) {
				$primary = $this->getPrimary();
				
				if ($primary === null) {
					throw new Exception('Unable to determine a primary property');
				}
			}
			
			if ($overwrite) {
				foreach ($this->_data as &$item) {
					if (isset($data[$item[$primary]])) {
						$item[$property] = $data[$item[$primary]];
					}
				}
			} else {
				foreach ($this->_data as &$item) {
					if (isset($data[$item[$primary]]) && ! isset($item[$property])) {
						$item[$property] = $data[$item[$primary]];
					}
				}
			}
		} else {
			if ($overwrite) {
				foreach ($this->_data as &$item) {
					$item[$property] = $data;
				}
			} else {
				foreach ($this->_data as &$item) {
					if (! isset($item[$property])) {
						$item[$property] = $data;
					}
				}
			}
		}
		
		return $this;
	}
476905
public function merge(DataArrayInterface $dataArray, $overwrite = true)
    {
        foreach ($dataArray as $key => $value) {
            //http://juliusbeckmann.de/blog/php-benchmark-isset-or-array_key_exists.html
            if (isset($this->value[$key])) {
                if (is_int($key)) {
                    $this->value[] = $value;
                } else if ($value instanceof self
                    && $this->value[$key] instanceof self) {
                    $this->value[$key]->merge($value);
                } else if ($overwrite) {
                    if ($value instanceof self) {
                        //new static for php 5.3. late static binding
                        //we need to do this since it is possible we are dealing
                        // with a derived class
                        $this->value[$key] = new static($value->toArray());
                    } else {
                        $this->value[$key] = $value;
                    }
                }
            } else {
                if ($value instanceof self) {
                    $this->value[$key] = new static($value->toArray());
                } else {
                    $this->value[$key] = $value;
                }
            }
        }

        return $this;
    }
1222904
public function beforePropertyModelSave(Property &$property, $insert)
    {
        // static values are forced to be of integer data type
        $property->data_type = Property::DATA_TYPE_INTEGER;
        return parent::beforePropertyModelSave($property, $insert);
    }
200944
public function set( $key, $value, $overwrite = true )
    {
        Option::set( $this->_map, $this->_hashKey( $key ), $value, $overwrite );

        return $this;
    }
813610
public function setDataFromArray(array $values = array())
    {
        foreach ($values as $key => $value) {

            $desiredKey = $this->trimPrefixKey($key);

            $propertyName = $this->getPropertyName($desiredKey);
            $setterMethodName = 'set' . ucfirst($propertyName);

            // Direct setter exists into object, just use it
            if (method_exists($this, $setterMethodName) && $value !== null) {
                $this->$setterMethodName($value);
            } elseif ($value !== null) {
                // Otherwise, try to get sub object to set data
                $this->setDataForSubEntitiy($desiredKey, $value);
            }
        }
        return $this;
    }
802448
public function def($property, $default = null)
	{
		$value = $this->get($property, $default);
		return $this->set($property, $value);
	}
438813
public function appendProperty($property) {
    if (is_string($property)) {
      $property = ClassMemberListNode::create($property);
    }
    $properties = $this->statements->children(Filter::isInstanceOf('\Pharborist\ClassMemberListNode'));
    if ($properties->count() === 0) {
      $this->statements->firstChild()->after($property);
    }
    else {
      $properties->last()->after($property);
    }
    FormatterFactory::format($this);
    return $this;
  }
1322273
public function set($property, $value)
    {
        $this->storage->openWriter();
        $object = $this->getObjectSafely('openWriter');
        $data = $object->getData();
        $data->{$property} = $value;
        $object->setData($data);
        $this->storage->setObject($object);
        $this->storage->close();
        return $value;
    }
1141570
public function saveChanges(
        $primaryValue,
        Connection $connection,
        Collection $collection
    ) {
        if ($collection->getEntityClass() !== $this->targetReflection->getClassName()) {
            throw new AssociationException(
                "Input collection should be type of "
                . $this->targetReflection->getClassName()
                . " but type of " . $collection->getEntityClass() . " given!"
            );
        }

        $changes = array_filter($collection->getChanges());
        if (empty($changes)) {
            return;
        }
        $changes = $collection->getChanges();

        $targetAdapter = $connection->getAdapter(
            $this->targetReflection->getAdapterName()
        );

        $mapper = $connection->getMapper();

        // Delete removed entities
        if ($changes[Entity::CHANGE_REMOVE]) {
            $this->_saveRemove(
                $targetAdapter,
                $mapper,
                $changes[Entity::CHANGE_REMOVE]
            );
        }

        // Detach entities
        if ($changes[Entity::CHANGE_DETACH]) {
            $this->_saveDetach(
                $targetAdapter,
                $mapper,
                $changes[Entity::CHANGE_DETACH]
            );
        }

        // Unmap primary value
        $primaryValue = $mapper->unmapValue(
            $this->sourceReflection->getPrimaryProperty(),
            $primaryValue
        );

        // Add entities
        $this->_saveAdd(
            $targetAdapter,
            $mapper,
            $changes[Entity::CHANGE_ADD],
            $primaryValue
        );

        // Attach entities
        if ($changes[Entity::CHANGE_ATTACH]) {
            $this->_saveAttach(
                $targetAdapter,
                $mapper,
                $changes[Entity::CHANGE_ATTACH],
                $primaryValue
            );
        }
    }
1021788
public function offsetSet($property, $value)
	{
		if(!isset($property))
			return $this->list[] = $value;
		
		return $this->list[$property] = $value;
	}
7968
public function replace($object, $property, $data, array $options = [])
    {
        $methodName = 'set'.ucfirst($property);

        if (!method_exists($object, $methodName)) {
            throw new \LogicException(
                sprintf('You have requested a non implemented action \'set\' on %s (looked for %s)', get_class($object), $methodName)
            );
        }

        //add the options to pass on here
        $this->checkPermission('PATCH', $object, [], true);
        //we'll need to pass the $action and $data here aswell later
        if ($this->dispatch('patch', 'pre', [$object, $options, $property, $data, self::PROPERTY_SET])) {
            $object->$methodName($data);

            $this->om->save($object);
            $this->dispatch('patch', 'post', [$object, $options, $property, $data, self::PROPERTY_SET]);
        }
    }
295567
public function set($id, $data, $where = '')
    {
        if (empty($where))
        {
            $where = $this->primary;
        }
        return $this->db->update($id, $data, $this->table, $where);
    }
950718
public function set($property, $value)
    {
        $defaultCurrentValue = [];
        $data = $this->session->get($this->_name, $defaultCurrentValue);
        $data[$property] = $value;

        $this->session->set($this->_name, $data);
    }
128423
public function exchangeArray($data)
    {
        foreach ($data as $property => $value) {
            if (isset($this->$property)) {
                $method = 'set' . ucfirst($property);
                $this->$method($value);
            }
        }
    }
727918
public function setValues($data)
    {
        if (!is_array($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->$key = $value;
        }
    }
633827
public function SetData($Key, $Value = NULL, $AddProperty = FALSE) {
      if (is_array($Key)) {
         $this->Data = array_merge($this->Data, $Key);

         if ($AddProperty === TRUE) {
            foreach ($Key as $Name => $Value) {
               $this->$Name = $Value;
            }
         }
         return;
      }

      $this->Data[$Key] = $Value;
      if($AddProperty === TRUE) {
         $this->$Key = $Value;
      }
      return $Value;
   }
311958
public function overwrite($key, $value=null)
    {
        if (!is_array($key)) {
            $this->overwrittenData[$key] = $value;
            return $this;
        }

        foreach ($key as $k=>$v) {
            $this->overwrite($k, $v);
        }

        return $this;
    }