public function findBySha1AndCollectionName($sha1Hash, $collectionName)
    {
        $query = $this->createQuery();
        $query->matching(
            $query->logicalAnd(
                $query->equals('sha1', $sha1Hash),
                $query->equals('collectionName', $collectionName)
            )
        );
        $resources = $query->execute()->toArray();
        foreach ($this->addedResources as $importedResource) {
            if ($importedResource->getSha1() === $sha1Hash && $importedResource->getCollectionName() === $collectionName) {
                $resources[] = $importedResource;
            }
        }

        return $resources;
    }
public function findBySha1AndCollectionName($sha1Hash, $collectionName)
    {
        $query = $this->createQuery();
        $query->matching(
            $query->logicalAnd(
                $query->equals('sha1', $sha1Hash),
                $query->equals('collectionName', $collectionName)
            )
        );
        $resources = $query->execute()->toArray();
        foreach ($this->addedResources as $importedResource) {
            if ($importedResource->getSha1() === $sha1Hash && $importedResource->getCollectionName() === $collectionName) {
                $resources[] = $importedResource;
            }
        }

        return $resources;
    }
public function findBySha1AndCollectionName ( $ sha1Hash , $ collectionName ) { $ query = $ this -> createQuery ( ) ; $ query -> matching ( $ query -> logicalAnd ( $ query -> equals ( 'sha1' , $ sha1Hash ) , $ query -> equals ( 'collectionName' , $ collectionName ) ) ) ; $ resources = $ query -> execute ( ) -> toArray ( ) ; foreach ( $ this -> addedResources as $ importedResource ) { if ( $ importedResource -> getSha1 ( ) === $ sha1Hash && $ importedResource -> getCollectionName ( ) === $ collectionName ) { $ resources [ ] = $ importedResource ; } } return $ resources ; }
Find all resources with the same SHA1 hash and collection

@param string $sha1Hash
@param string $collectionName
@return array
Find all resources with the same SHA1 hash and collection