public function getSubsetByHashes(array $hashes)
    {
        $subset = [];

        foreach ($this->items as $item) {
            $class = get_class($item);

            $mapper = Manager::getMapper($class);

            $keyName = $mapper->getEntityMap()->getKeyName();

            if (in_array($class.'.'.$item->$keyName, $hashes)) {
                $subset[] = $item;
            }
        }

        return $subset;
    }
public function getSubsetByHashes(array $hashes)
    {
        $subset = [];

        foreach ($this->items as $item) {
            $class = get_class($item);

            $mapper = Manager::getMapper($class);

            $keyName = $mapper->getEntityMap()->getKeyName();

            if (in_array($class.'.'.$item->$keyName, $hashes)) {
                $subset[] = $item;
            }
        }

        return $subset;
    }
public function getSubsetByHashes ( array $ hashes ) { $ subset = [ ] ; foreach ( $ this -> items as $ item ) { $ class = get_class ( $ item ) ; $ mapper = Manager :: getMapper ( $ class ) ; $ keyName = $ mapper -> getEntityMap ( ) -> getKeyName ( ) ; if ( in_array ( $ class . '.' . $ item -> $ keyName , $ hashes ) ) { $ subset [ ] = $ item ; } } return $ subset ; }
Get a subset of the collection from entity hashes.

@param array $hashes

@throws MappingException

@return array
Get a subset of the collection from entity hashes .