chill-bundles/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php

78 lines
2.2 KiB
PHP

<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Repository;
use Chill\MainBundle\Search\SearchApiQuery;
use Chill\PersonBundle\Entity\Person;
use DateTimeInterface;
interface PersonACLAwareRepositoryInterface
{
public const SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL = 'alphabetical';
public const SIMILAR_SEARCH_ORDER_BY_SIMILARITY = 'similarity';
public function buildAuthorizedQuery(
?string $default = null,
?string $firstname = null,
?string $lastname = null,
?DateTimeInterface $birthdate = null,
?DateTimeInterface $birthdateBefore = null,
?DateTimeInterface $birthdateAfter = null,
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
): SearchApiQuery;
public function countBySearchCriteria(
?string $default = null,
?string $firstname = null,
?string $lastname = null,
?DateTimeInterface $birthdate = null,
?DateTimeInterface $birthdateBefore = null,
?DateTimeInterface $birthdateAfter = null,
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
);
/**
* @return array|Person[]
*/
public function findBySearchCriteria(
int $start,
int $limit,
bool $simplify = false,
?string $default = null,
?string $firstname = null,
?string $lastname = null,
?DateTimeInterface $birthdate = null,
?DateTimeInterface $birthdateBefore = null,
?DateTimeInterface $birthdateAfter = null,
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
): array;
/**
* @return array|Person[]
*/
public function findMatchingPersons(
Person $person,
float $precision = 0.15,
string $orderBy = self::SIMILAR_SEARCH_ORDER_BY_SIMILARITY
): array;
}