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

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

Permet de récupérer une liste de personnes proches d'une personne
public getClosePersons ( string $n, string $p, string $oc, boolean $onlyRecent = null, boolean $spouseAscend = null, integer $nbGenAsc = null, integer $nbGenDesc = null ) : object\ListPerson
$n string
$p string
$oc string
$onlyRecent boolean
$spouseAscend boolean
$nbGenAsc integer
$nbGenDesc integer
Результат object\ListPerson
    public function getClosePersons($n, $p, $oc, $onlyRecent = null, $spouseAscend = null, $nbGenAsc = null, $nbGenDesc = null)
    {
        $ccp = new \geneweb\api\object\ClosePersonsParams();
        $rp = new \geneweb\api\object\ReferencePerson();
        $rp->setN((string) $n);
        $rp->setP((string) $p);
        $rp->setOc((int) $oc);
        $ccp->setPerson($rp);
        if ($nbGenAsc !== null && $nbGenAsc != "") {
            $ccp->setNbGenAsc((int) $nbGenAsc);
        }
        if ($nbGenDesc !== null && $nbGenDesc != "") {
            $ccp->setNbGenDesc((int) $nbGenDesc);
        }
        if ($spouseAscend !== null && $spouseAscend !== "") {
            $ccp->setSpouseAscend((bool) $spouseAscend);
        }
        if ($onlyRecent !== null && $onlyRecent !== "") {
            $ccp->setOnlyRecent((bool) $onlyRecent);
        }
        return $this->request("CLOSE_PERSONS", $ccp, $this->getClassname('ListPersonRelation'));
    }