public function mergeWith(Parsed $other)
    {
        $mergeMethod = Translations::MERGE_ADD | Translations::MERGE_PLURAL;
        if ($other->sourceStrings !== null) {
            if ($this->sourceStrings === null) {
                $this->sourceStrings = $other->sourceStrings;
            } else {
                $this->sourceStrings->mergeWith($other->sourceStrings, $mergeMethod);
            }
        }
        foreach ($other->translations as $key => $data) {
            if (isset($this->translations[$key])) {
                $this->translations[$key][1]->mergeWith($data[1], $mergeMethod);
            } else {
                $this->translations[$key] = $data;
            }
        }
    }
public function mergeWith(Parsed $other)
    {
        $mergeMethod = Translations::MERGE_ADD | Translations::MERGE_PLURAL;
        if ($other->sourceStrings !== null) {
            if ($this->sourceStrings === null) {
                $this->sourceStrings = $other->sourceStrings;
            } else {
                $this->sourceStrings->mergeWith($other->sourceStrings, $mergeMethod);
            }
        }
        foreach ($other->translations as $key => $data) {
            if (isset($this->translations[$key])) {
                $this->translations[$key][1]->mergeWith($data[1], $mergeMethod);
            } else {
                $this->translations[$key] = $data;
            }
        }
    }
public function mergeWith ( Parsed $ other ) { $ mergeMethod = Translations :: MERGE_ADD | Translations :: MERGE_PLURAL ; if ( $ other -> sourceStrings !== null ) { if ( $ this -> sourceStrings === null ) { $ this -> sourceStrings = $ other -> sourceStrings ; } else { $ this -> sourceStrings -> mergeWith ( $ other -> sourceStrings , $ mergeMethod ) ; } } foreach ( $ other -> translations as $ key => $ data ) { if ( isset ( $ this -> translations [ $ key ] ) ) { $ this -> translations [ $ key ] [ 1 ] -> mergeWith ( $ data [ 1 ] , $ mergeMethod ) ; } else { $ this -> translations [ $ key ] = $ data ; } } }
Merge another instance into this one.

@param Parsed $other
Merge another instance into this one .