private function appendChangeSet(Model $model, array $obj, Closure $handler)
    {
        $metadata = $model->getMetadata();
        $changeset = $model->getChangeSet();
        $formatter = $this->getFormatter();

        foreach ($this->changeSetMethods as $setKey => $methods) {
            list($metaMethod, $formatMethod) = $methods;
            foreach ($changeset[$setKey] as $key => $values) {
                $value = $formatter->$formatMethod($metadata->$metaMethod($key), $values['new']);
                $obj = $handler($key, $value, $obj);
            }
        }
        return $obj;
    }
private function appendChangeSet(Model $model, array $obj, Closure $handler)
    {
        $metadata = $model->getMetadata();
        $changeset = $model->getChangeSet();
        $formatter = $this->getFormatter();

        foreach ($this->changeSetMethods as $setKey => $methods) {
            list($metaMethod, $formatMethod) = $methods;
            foreach ($changeset[$setKey] as $key => $values) {
                $value = $formatter->$formatMethod($metadata->$metaMethod($key), $values['new']);
                $obj = $handler($key, $value, $obj);
            }
        }
        return $obj;
    }
private function appendChangeSet ( Model $ model , array $ obj , Closure $ handler ) { $ metadata = $ model -> getMetadata ( ) ; $ changeset = $ model -> getChangeSet ( ) ; $ formatter = $ this -> getFormatter ( ) ; foreach ( $ this -> changeSetMethods as $ setKey => $ methods ) { list ( $ metaMethod , $ formatMethod ) = $ methods ; foreach ( $ changeset [ $ setKey ] as $ key => $ values ) { $ value = $ formatter -> $ formatMethod ( $ metadata -> $ metaMethod ( $ key ) , $ values [ 'new' ] ) ; $ obj = $ handler ( $ key , $ value , $ obj ) ; } } return $ obj ; }
Appends the change set values to a database object based on the provided handler.

@param   Model   $model
@param   array   $obj
@param   Closure $handler
@return  array
Appends the change set values to a database object based on the provided handler .