geneweb\api\GenewebAPI::startingWithSearch PHP Метод

startingWithSearch() публичный Метод

Permet de rechercher les individus commençant par le nom ET le prénom Exemple: $lastname = mar et $firstname = jean renverra MARTIN Jean / MARTIN Jean Nicolas / MARTINIERE Jeanne
public startingWithSearch ( string $lastname, string $firstname = null, boolean $onlySosa = false, boolean $onlyRecent = false ) : object\ListPersons
$lastname string
$firstname string
$onlySosa boolean
$onlyRecent boolean
Результат object\ListPersons
    public function startingWithSearch($lastname, $firstname = null, $onlySosa = false, $onlyRecent = false)
    {
        $sp = new \geneweb\api\object\SearchParams();
        $sp->setSearchType(\geneweb\api\object\SearchType::STARTING_WITH);
        if ($lastname !== "") {
            $sp->setLastname($lastname);
        }
        if ($firstname !== null && $firstname !== "") {
            $sp->setFirstname($firstname);
        }
        if ((bool) $only_sosa) {
            $this->addFilter(new filters\FilterOnlySosa());
        }
        if ((bool) $only_recent) {
            $this->addFilter(new filters\FilterOnlyRecent());
        }
        return $this->request("SEARCH", $sp, $this->getClassname('ListPersons'));
    }