Set the properties

@param   mixed   $properties  Either and associative array, an object or a ModelEntityInterface
@param   boolean $modified    If TRUE, update the modified information for each column being set.
@return  ModelEntityInterface
515111
public function setProperties($properties, $modified = true)
    {
        return $this->fetch()->setProperties($properties, $modified = true);
    }
621271
public function setRawProperties( $properties )
    {
        if ( ! empty( $properties ) )
        {
            foreach ( $properties as $name => $value )
            {
                switch ( true )
                {
                    case is_array( $value ) &&
                            array_key_exists( 'value', $value ):
                        $value = (object) $value;

                    case is_object( $value ):
                        if ( ! isset( $value->value ) )
                        {
                            $value->value = null;
                        }

                        if ( ! isset( $value->priority ) )
                        {
                            $value->priority = null;
                        }

                        if ( ! isset( $value->name ) )
                        {
                            $value->name = $name;
                        }

                        $this->setRawProperty(
                            $value->name,
                            $value->value,
                            $value->priority
                        );
                        break;

                    case is_array( $value ):
                        if ( count( $value ) > 2 )
                        {
                            list( $rawName, $value, $priority ) = $value;

                            if ( empty( $rawName ) )
                            {
                                $rawName = $name;
                            }
                        }
                        else if ( count( $value ) > 1 )
                        {
                            $rawName = $name;
                            list( $value, $priority ) = $value;
                        }
                        else
                        {
                            $rawName    = $name;
                            $priority   = null;
                            $value      = empty( $value ) ? null : current( $value );
                        }

                        $this->setRawProperty( $rawName, $value, $priority );
                        break;

                    default:
                        $this->setRawProperty( $name, $value );
                        break;
                }
            }
        }

        return $this;
    }
1130554
public function setProperties( $properties )
    {
        if ( ! empty( $properties ) )
        {
            foreach ( $properties as $name => $value )
            {
                switch ( true )
                {
                    case is_array( $value ) &&
                            array_key_exists( 'value', $value ):
                        $value = (object) $value;

                    case is_object( $value ):
                        if ( ! isset( $value->value ) )
                        {
                            $value->value = null;
                        }

                        if ( ! isset( $value->priority ) )
                        {
                            $value->priority = null;
                        }

                        if ( ! isset( $value->name ) )
                        {
                            $value->name = $name;
                        }

                        $this->setProperty(
                            $value->name,
                            $value->value,
                            $value->priority
                        );
                        break;

                    case is_array( $value ):
                        if ( count( $value ) > 2 )
                        {
                            list( $tmpName, $value, $priority ) = $value;
                            $name = $tmpName ?: $name;
                        }
                        else if ( count( $value ) > 1 )
                        {
                            list( $value, $priority ) = $value;
                        }
                        else
                        {
                            $priority   = null;
                            $value      = empty( $value ) ? null : current( $value );
                        }

                        $this->setProperty( $name, $value, $priority );
                        break;

                    default:
                        $this->setProperty( $name, $value );
                        break;
                }
            }
        }

        return $this;
    }
638172
public function setProperty($property, $arr)
    {
        if (!ArrayLib::is_associative($arr)) {
            $arr = array_combine($arr, $arr);
        }
        // Make sure all columns exists
        foreach ($arr as $colName => $value) {
            if (!isset($this->columns[$colName])) {
                $this->columns[$colName] = array();
            }
        }
        // Assign values to columns
        foreach ($this->columns as $colName => $colData) {
            if (isset($arr[$colName])) {
                $colData[$property]      = $arr[$colName];
                $this->columns[$colName] = $colData;
            }
        }
        return $this;
    }
317776
public function getProperties($modified = false)
    {
        $properties = $this->_data;

        if ($modified) {
            $properties = array_intersect_key($properties, $this->_modified);
        }

        return $properties;
    }
397666
public function setModifiedFks(array $modifiedFks)
    {
        $this->modifiedFks = [];
        foreach ($modifiedFks as $foreignKeys) {
            list($fromForeignKey, $toForeignKey) = $foreignKeys;
            $this->addModifiedFk($fromForeignKey->getName(), $fromForeignKey, $toForeignKey);
        }
    }
956300
public function addFormProperties(array $properties)
    {
        foreach ($properties as $propertyIdent => $property) {
            $this->addFormProperty($propertyIdent, $property);
        }

        return $this;
    }
1198820
protected function setForeignConstraintFromArray(array $properties)
    {
        $foreignConstraint = $this->getForeignConstraintFromArray($properties);

        $this->setForeignConstraint($foreignConstraint);

        if ($this->hasForeignConstraint() && !$this->hasForeignRelation()) {
            $this->setForeignRelation($foreignConstraint->getForeignRelation());
        }

        return $this;
    }
939705
public static function fromProperties(array $properties)
    {
        $copy = new self();
        foreach (self::getPropertyNames() as $name) {
            if (isset($properties[$name])) {
                $copy->{'set'.ucfirst($name)}($properties[$name]);
            }
        }

        return $copy;
    }
74151
public function setProperty($name, $value, $modified = true)
    {
        if($row = $this->getIterator()->current()) {
            $row->setProperty($name, $value, $modified);
        }

        return $this;
    }
692071
public static function setProperties($properties = null)
    {
        if ($properties === null) {
            $properties = self::getProperties();
        }

        self::$properties = $properties;
    }
61531
public function configure(array $properties)
    {
        foreach ($properties as $name => $value) {
            $methodName = 'set' . ucfirst(strtolower($name));
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
84358
public function setProperties(array $properties): self
    {
        // check all keys and values are non-empty strings
        $this->properties = [];
        foreach ($properties as $key => $value) {
            assert(is_scalar($key) === true && strlen((string)$key) > 0);
            assert(is_string($value) === true && strlen($value) > 0);
            $this->properties[(string)$key] = (string)$value;
        }

        return $this;
    }
54004
public function modify(array $properties)
  {
    $properties["clid"] = $this->getId();

    $this->execute("clientedit", $properties);
    $this->resetNodeInfo();
  }
1296175
public function setProperties($properties)
    {
        $obj = $this->excel->getProperties();
        foreach ($properties as $property_name => $value) {
            $method = "set$property_name";
            if (method_exists($obj, $method)) {
                $obj->{$method}($value);
            }
        }

        return $this;
    }
1096269
public function getProperties($modified = false)
    {
        $result = array();

        if($entity = $this->getIterator()->current()) {
            $result = $entity->getProperties($modified);
        }

        return $result;
    }
105234
public function setProperties(array $properties) : DataSet
    {
        $this->properties = [];

        foreach ($properties as $key => $value) {
            $this->addProperty($key, $value);
        }

        return $this;
    }