protected function processEmbedsChanged()
    {
        $cache = $this->_cache;
        $attrs = $this->getAttrs();
        foreach ($cache as $key => $item) {
            if(!isset($attrs[$key])) continue;
            $attr = $attrs[$key];
            if ($attr['type'] == self::DATA_TYPE_EMBED) {
                $item->processEmbedsChanged();
                if ( $item instanceof Model && $this->cleanData[$key] !== $item->toArray()) {
                    $this->__setter($key, $item);
                }
            } elseif ($attr['type'] == self::DATA_TYPE_EMBEDS) {
                if ( $item instanceof Collection && $this->cleanData[$key] !== $item->toEmbedsArray()) {
                    $this->__setter($key, $item);
                }
            }
        }
    }
protected function processEmbedsChanged()
    {
        $cache = $this->_cache;
        $attrs = $this->getAttrs();
        foreach ($cache as $key => $item) {
            if(!isset($attrs[$key])) continue;
            $attr = $attrs[$key];
            if ($attr['type'] == self::DATA_TYPE_EMBED) {
                $item->processEmbedsChanged();
                if ( $item instanceof Model && $this->cleanData[$key] !== $item->toArray()) {
                    $this->__setter($key, $item);
                }
            } elseif ($attr['type'] == self::DATA_TYPE_EMBEDS) {
                if ( $item instanceof Collection && $this->cleanData[$key] !== $item->toEmbedsArray()) {
                    $this->__setter($key, $item);
                }
            }
        }
    }
protected function processEmbedsChanged ( ) { $ cache = $ this -> _cache ; $ attrs = $ this -> getAttrs ( ) ; foreach ( $ cache as $ key => $ item ) { if ( ! isset ( $ attrs [ $ key ] ) ) continue ; $ attr = $ attrs [ $ key ] ; if ( $ attr [ 'type' ] == self :: DATA_TYPE_EMBED ) { $ item -> processEmbedsChanged ( ) ; if ( $ item instanceof Model && $ this -> cleanData [ $ key ] !== $ item -> toArray ( ) ) { $ this -> __setter ( $ key , $ item ) ; } } elseif ( $ attr [ 'type' ] == self :: DATA_TYPE_EMBEDS ) { if ( $ item instanceof Collection && $ this -> cleanData [ $ key ] !== $ item -> toEmbedsArray ( ) ) { $ this -> __setter ( $ key , $ item ) ; } } } }
Update the 'embeds' attribute for model's instance when that 'embeds' data  has changed.

@return null
Update the embeds attribute for model s instance when that embeds data has changed .