for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace XApi\Repository\MongoDB\Repository;
use Doctrine\ODM\MongoDB\DocumentRepository;
use XApi\Repository\Doctrine\Mapping\Statement;
use XApi\Repository\Doctrine\Repository\Mapping\StatementRepository as StatementRepositoryInterface;
/**
* A MongoDB backed statement repository.
* @author Christian Flothmann <[email protected]>
final class StatementRepository extends DocumentRepository implements StatementRepositoryInterface
{
* {@inheritdoc}
public function findStatement(array $criteria)
return $this->findOneBy($criteria);
}
public function findStatements(array $criteria)
return $this->findBy($criteria);
public function storeStatement(Statement $mappedStatement, $flush = true)
$this->getDocumentManager()->persist($mappedStatement);
if ($flush) {
$this->getDocumentManager()->flush();