public function bind($entity, array $data)
    {
        $meta = $this->getMeta();

        foreach ($data as $key => $value) {
            if (is_null($value)) {
                continue;
            }

            if (array_key_exists($key, $meta->fields)) {
                $property            = $meta->propertyName($key);
                $entity->{$property} = $value;
            }
        }

        $this->unitOfWork->getEntityRegistry()->getEntityBuilder()->resolve($entity);
    }
public function bind($entity, array $data)
    {
        $meta = $this->getMeta();

        foreach ($data as $key => $value) {
            if (is_null($value)) {
                continue;
            }

            if (array_key_exists($key, $meta->fields)) {
                $property            = $meta->propertyName($key);
                $entity->{$property} = $value;
            }
        }

        $this->unitOfWork->getEntityRegistry()->getEntityBuilder()->resolve($entity);
    }
public function bind ( $ entity , array $ data ) { $ meta = $ this -> getMeta ( ) ; foreach ( $ data as $ key => $ value ) { if ( is_null ( $ value ) ) { continue ; } if ( array_key_exists ( $ key , $ meta -> fields ) ) { $ property = $ meta -> propertyName ( $ key ) ; $ entity -> { $ property } = $ value ; } } $ this -> unitOfWork -> getEntityRegistry ( ) -> getEntityBuilder ( ) -> resolve ( $ entity ) ; }
Change an entities properties

@param   object $entity The entity to change
@param   array  $data   A hash with the properties for the new entity

@return  void
Change an entities properties