app/Fact.php
public function target()
    {
        $xref = trim($this->value(), '@');
        switch ($this->tag) {
            case 'FAMC':
            case 'FAMS':
                return Family::getInstance($xref, $this->record()->tree());
            case 'HUSB':
            case 'WIFE':
            case 'CHIL':
                return Individual::getInstance($xref, $this->record()->tree());
            case 'SOUR':
                return Source::getInstance($xref, $this->record()->tree());
            case 'OBJE':
                return Media::getInstance($xref, $this->record()->tree());
            case 'REPO':
                return Repository::getInstance($xref, $this->record()->tree());
            case 'NOTE':
                return Note::getInstance($xref, $this->record()->tree());
            default:
                return GedcomRecord::getInstance($xref, $this->record()->tree());
        }
    }
public function target()
    {
        $xref = trim($this->value(), '@');
        switch ($this->tag) {
            case 'FAMC':
            case 'FAMS':
                return Family::getInstance($xref, $this->record()->tree());
            case 'HUSB':
            case 'WIFE':
            case 'CHIL':
                return Individual::getInstance($xref, $this->record()->tree());
            case 'SOUR':
                return Source::getInstance($xref, $this->record()->tree());
            case 'OBJE':
                return Media::getInstance($xref, $this->record()->tree());
            case 'REPO':
                return Repository::getInstance($xref, $this->record()->tree());
            case 'NOTE':
                return Note::getInstance($xref, $this->record()->tree());
            default:
                return GedcomRecord::getInstance($xref, $this->record()->tree());
        }
    }
public function target ( ) { $ xref = trim ( $ this -> value ( ) , '@' ) ; switch ( $ this -> tag ) { case 'FAMC' : case 'FAMS' : return Family :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; case 'HUSB' : case 'WIFE' : case 'CHIL' : return Individual :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; case 'SOUR' : return Source :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; case 'OBJE' : return Media :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; case 'REPO' : return Repository :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; case 'NOTE' : return Note :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; default : return GedcomRecord :: getInstance ( $ xref , $ this -> record ( ) -> tree ( ) ) ; } }
Get the record to which this fact links

@return Individual|Family|Source|Repository|Media|Note|GedcomRecord|null
Get the record to which this fact links