src/CRUDlex/AbstractData.php
public function update(Entity $entity)
    {
        if (!$this->events->shouldExecute($entity, 'before', 'update')) {
            return false;
        }
        $result = $this->doUpdate($entity);
        $this->events->shouldExecute($entity, 'after', 'update');
        return $result;
    }
public function update(Entity $entity)
    {
        if (!$this->events->shouldExecute($entity, 'before', 'update')) {
            return false;
        }
        $result = $this->doUpdate($entity);
        $this->events->shouldExecute($entity, 'after', 'update');
        return $result;
    }
public function update ( Entity $ entity ) { if ( ! $ this -> events -> shouldExecute ( $ entity , 'before' , 'update' ) ) { return false ; } $ result = $ this -> doUpdate ( $ entity ) ; $ this -> events -> shouldExecute ( $ entity , 'after' , 'update' ) ; return $ result ; }
Updates an existing entry in the datasource having the same id.

@param Entity $entity
the entity with the new data

@return boolean
true on successful update
Updates an existing entry in the datasource having the same id .