src/Data/DefaultCollection.php
public function isSubsetOf($collection)
    {
        /** @var ModelInterface $localModel */
        foreach ($this as $localModel) {
            /** @var ModelInterface $otherModel */
            foreach ($collection as $otherModel) {
                if (($localModel->getProviderName() === $otherModel->getProviderName())
                    && ($localModel->getId() === $otherModel->getId())
                ) {
                    continue;
                }
                return false;
            }
        }
        return true;
    }
public function isSubsetOf($collection)
    {
        /** @var ModelInterface $localModel */
        foreach ($this as $localModel) {
            /** @var ModelInterface $otherModel */
            foreach ($collection as $otherModel) {
                if (($localModel->getProviderName() === $otherModel->getProviderName())
                    && ($localModel->getId() === $otherModel->getId())
                ) {
                    continue;
                }
                return false;
            }
        }
        return true;
    }
public function isSubsetOf ( $ collection ) { /** @var ModelInterface $localModel */ foreach ( $ this as $ localModel ) { /** @var ModelInterface $otherModel */ foreach ( $ collection as $ otherModel ) { if ( ( $ localModel -> getProviderName ( ) === $ otherModel -> getProviderName ( ) ) && ( $ localModel -> getId ( ) === $ otherModel -> getId ( ) ) ) { continue ; } return false ; } } return true ; }
Check if the given collection is an subset of the given collection.

@param CollectionInterface $collection The collection to check.

@return boolean
Check if the given collection is an subset of the given collection .