@param array      $criteria
@param array|null $orderBy
@param int|null   $limit
@param int|null   $offset

@return array|object[]
164898
public function loadAll(array $criteria = [], array $orderBy = null, $limit = null, $offset = null)
    {
        $stmt = $this->getMatchCypher($criteria, $orderBy, $limit, $offset);
        $result = $this->_em->getDatabaseDriver()->run($stmt->text(), $stmt->parameters());

        $hydrator = $this->_em->getEntityHydrator($this->_className);

        return $hydrator->hydrateAll($result);
    }
53177
public function findOneBy(array $criteria, array $orderBy = null)
    {
        $qb = $this->createQueryBuilder('o');

        $this->applyCriteriaAndOrderByToQueryBuilder($qb, $criteria, $orderBy);

        return $qb->getQuery()->getOneOrNullResult();
    }
1116665
public function findOneOrNullBy(array $criteria)
    {

        $query = $this->createQueryBuilder($criteria);

        $object = $this->getOneOrNullResultFromQueryBuilder($query);

        return $object;
    }
350974
public function findByModule(ModuleInterface $module = null, array $orderBy = null, $limit = null, $offset = null)
    {
        $criteria = [];

        if ($this->isModular($module)) {
            $criteria['module'] = $module;
        }

        /** @var EntityRepository $this */
        return $this->findBy($criteria, $orderBy, $limit, $offset);
    }
598445
public function getOneEntityBy(array $criteria = [], array $orders = [], $offset = null): ?AbstractEntity
    {
        $entity = $this->getRepository()->findOneBy($criteria, $orders, $offset);

        if ($entity instanceof AbstractEntity) {
            $this->prepareEntityForGet($entity);
        }

        return $entity;
    }
457655
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
    {
        $this->throwBadMethodException('findBy');
    }
625582
public static function find($criteria = array(), $sort = array(), $fields = array() , $limit = null , $skip = null)
    {

        self::processCriteriaWithType($criteria);


        $results =  self::connection()->find(static::$collection, $criteria, self::mapFields($fields));

        if ( ! is_null($limit)) {
            $results->limit($limit);
        }

        if ( !  is_null($skip)) {
            $results->skip($skip);
        }

        if ( ! empty($sort)) {
            $results->sort(self::mapFields($sort));
        }

        return Hydrator::hydrate(get_called_class(), $results , Hydrator::TYPE_COLLECTION , true);

    }
1287187
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
    {
        $persister = $this->entityManager->getEntityPersister($this->className);

        return $persister->loadAll($criteria, $orderBy, $limit, $offset);
    }
676275
public function findPaginated(
        $entityClass,
        array $criteria,
        $sorting = [],
        $offset = Request\Params::DEFAULT_PAGE_OFFSET,
        $limit = Request\Params::DEFAULT_PAGE_SIZE,
        $translatable = false
    )
    {
        $qb = $this->getQueryBuilder($entityClass, $criteria, $sorting, $translatable);
        
        $qb->setFirstResult($offset)
            ->setMaxResults($limit);

        $paginator = new Paginator($qb->getQuery());
        $collection = new PaginatedCollection($paginator);

        return $collection;
    }
72367
function criteria(array $criteria) {
		if ((list($left, $right) = each($criteria))) {
			$this->write("(");
			if (is_array($right)) {
				$this->criteria($right);
			} else {
				$this->write("(", $left, $this->param($right), ")");
			}
			while ((list($left, $right) = each($criteria))) {
				$this->write(is_int($left) && is_array($right) ? "OR" : "AND");
				if (is_array($right)) {
					$this->criteria($right);
				} else {
					$this->write("(", $left, $this->param($right), ")");
				}
			}
			$this->write(")");
		}
		return $this;
	}
23859
public function findOneBy(array $criteria) : ?array
    {
        foreach ($this->objects as $object) {
            $matches = true;

            foreach ($criteria as $key => $value) {
                if ($object[$key] === $value) {
                    continue;
                }

                $matches = false;
            }

            if ($matches) {
                return $object;
            }
        }

        return null;
    }
1092409
public function complexFindBy(array $criteria, array $orderBy = [], $limit = null, $offset = null)
    {
        $qb = $this->createQueryBuilder("p");

        foreach($criteria as $c => $v){
            $qb->andWhere("p.$c $v");
        }
        foreach($orderBy as $c => $v){
            $qb->addOrderBy("p.".$c,$v);
        }
        if (isset($limit)) $qb->setMaxResults($limit);
        if (isset($offset)) $qb->setFirstResult($offset);

        return $qb->getQuery()->getResult();
    }
701291
public function createQueryBuilder(array $criteria = null, array $orderBy = null, $limit = null, $offset = null, $class = null)
    {
        $baseQueryBuilder = $this->createBaseQueryBuilder($class);

        $queryBuilder = $this->alterBaseQueryBuilder($baseQueryBuilder);

        if (!is_null($criteria)) {
            foreach ($criteria as $key => $value) {
                $queryBuilder->andWhere($queryBuilder->getRootAliases()[0] . '.' . $key . ' = ' . $this->addNamedParameter($key, $value, $queryBuilder));
            }
        }

        if (!is_null($orderBy)) {
            foreach ($orderBy as $sort => $order) {
                $queryBuilder->addOrderBy($queryBuilder->getRootAliases()[0] . '.' . $sort, $order);
            }
        }

        if (!is_null($limit)) {
            $queryBuilder->setMaxResults($limit);
        }

        if (!is_null($offset)) {
            $queryBuilder->setFirstResult($offset);
        }

        return $queryBuilder;
    }
1254543
public function findBy(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null)
    {
        return $this->findAll();
    }
31472
public function get(
        $where = null,
        $order = null,
        $limit = null,
        $offset = null,
        $columns = null,
        $group = null,
        $having = null
    ) {
        $result = parent::get($where, $order, $limit, $offset, $columns, $group, $having);
        return $result;
    }
1333109
public function selectArray($fields = null, $where = null, $orderBy = null, $limit = null): array
    {
        return self::select2($fields, $where, $orderBy, $limit);
    }
1062453
public function findBy(array $criteria = [], array $orders = [], $limit = null, $offset = null): array
    {
        $options = [];

        if ($orders) {
            foreach ($orders as $field => &$dir) {
                if ($dir === 'ASC') {
                    $dir = 1;
                } elseif ($dir === 'DESC') {
                    $dir = -1;
                }

            }
            $options['sort'] = $orders;
        }

        if ($limit !== null) {
            $options['limit'] = $limit;
        }

        if ($offset !== null) {
            $options['skip'] = $offset;
        }

        $options['projection'] = [];

        /** @var Cursor $cursor */
        $cursor = $this->collection->find($criteria, $options);

        $ids = [];

        $data = iterator_to_array($cursor);

        array_walk($data, function($value, $key) use (&$ids) {
            $ids[] = $value['_id'];
        });

        return $this->findByIds($ids);
    }