src/Synapse/Mapper/UpdaterTrait.php
public function update(AbstractEntity $entity)
    {
        if ($this->updatedTimestampColumn) {
            $entity->exchangeArray([$this->updatedTimestampColumn => time()]);
        }

        if ($this->updatedDatetimeColumn) {
            $entity->exchangeArray([$this->updatedDatetimeColumn => date('Y-m-d H:i:s')]);
        }

        $this->updateRow($entity);

        return $entity;
    }
public function update(AbstractEntity $entity)
    {
        if ($this->updatedTimestampColumn) {
            $entity->exchangeArray([$this->updatedTimestampColumn => time()]);
        }

        if ($this->updatedDatetimeColumn) {
            $entity->exchangeArray([$this->updatedDatetimeColumn => date('Y-m-d H:i:s')]);
        }

        $this->updateRow($entity);

        return $entity;
    }
public function update ( AbstractEntity $ entity ) { if ( $ this -> updatedTimestampColumn ) { $ entity -> exchangeArray ( [ $ this -> updatedTimestampColumn => time ( ) ] ) ; } if ( $ this -> updatedDatetimeColumn ) { $ entity -> exchangeArray ( [ $ this -> updatedDatetimeColumn => date ( 'Y-m-d H:i:s' ) ] ) ; } $ this -> updateRow ( $ entity ) ; return $ entity ; }
Update the given entity in the database.

@param  AbstractEntity $entity
@return AbstractEntity
Update the given entity in the database .