public function all()
    {
        $documents = array_merge($this->getSaved(), $this->getAdd());

        foreach ($this->getRemove() as $document) {
            if (false !== $key = array_search($document, $documents)) {
                unset($documents[$key]);
            }
        }

        return array_values($documents);
    }
public function all()
    {
        $documents = array_merge($this->getSaved(), $this->getAdd());

        foreach ($this->getRemove() as $document) {
            if (false !== $key = array_search($document, $documents)) {
                unset($documents[$key]);
            }
        }

        return array_values($documents);
    }
public function all ( ) { $ documents = array_merge ( $ this -> getSaved ( ) , $ this -> getAdd ( ) ) ; foreach ( $ this -> getRemove ( ) as $ document ) { if ( false !== $ key = array_search ( $ document , $ documents ) ) { unset ( $ documents [ $ key ] ) ; } } return array_values ( $ documents ) ; }
Returns the saved + add - removed elements.

@api
Returns the saved + add - removed elements .