geneweb\api\GenewebAPI::getIndividualInfos PHP Méthode

getIndividualInfos() public méthode

Permet de récupérer les infos d'un individu
public getIndividualInfos ( string $n, string $p, string $oc ) : object\Person
$n string
$p string
$oc string
Résultat object\Person
    public function getIndividualInfos($n, $p, $oc)
    {
        //valeur négative impossible
        if ((int) $oc < 0) {
            $classname = $this->getClassname('Person');
            $obj = new $classname();
            $obj->setN((string) $n);
            $obj->setP((string) $p);
            $obj->setOc((int) $oc);
            if ($this->output == self::OUTPUT_PB) {
                return $obj;
            }
            return "";
        } else {
            $rp = new \geneweb\api\object\ReferencePerson();
            $rp->setN((string) $n);
            $rp->setP((string) $p);
            $rp->setOc((int) $oc);
            return $this->request("INFO_IND", $rp, $this->getClassname('Person'));
        }
    }