public function intersect($collection)
	{
		$intersect = new static;

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

		foreach ($this->items as $item)
		{
			if (isset($dictionary[$item->getKey()]))
			{
				$intersect->add($item);
			}
		}

		return $intersect;
	}
public function intersect($collection)
	{
		$intersect = new static;

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

		foreach ($this->items as $item)
		{
			if (isset($dictionary[$item->getKey()]))
			{
				$intersect->add($item);
			}
		}

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

@param  \Fly\Support\Collection|\Fly\Support\Contracts\ArrayableInterface|array  $items
@return \Fly\Support\Collection
Intersect the collection with the given items .