public function diff($items)
    {
        $diff = new static();

        $dictionary = $this->getDictionary($items);

        foreach ($this->items as $item) {
            if (!isset($dictionary[$this->getEntityKey($item)])) {
                $diff->add($item);
            }
        }

        return $diff;
    }
public function diff($items)
    {
        $diff = new static();

        $dictionary = $this->getDictionary($items);

        foreach ($this->items as $item) {
            if (!isset($dictionary[$this->getEntityKey($item)])) {
                $diff->add($item);
            }
        }

        return $diff;
    }
public function diff ( $ items ) { $ diff = new static ( ) ; $ dictionary = $ this -> getDictionary ( $ items ) ; foreach ( $ this -> items as $ item ) { if ( ! isset ( $ dictionary [ $ this -> getEntityKey ( $ item ) ] ) ) { $ diff -> add ( $ item ) ; } } return $ diff ; }
Diff the collection with the given items.

@param \ArrayAccess|array $items

@return self
Diff the collection with the given items .