public function getForeignPrimaryKeys()
    {
        $lfmap = $this->getLocalForeignMapping();
        $foreignTable = $this->getForeignTable();

        $foreignPKCols = [];
        foreach ($foreignTable->getPrimaryKey() as $fPKCol) {
            $foreignPKCols[$fPKCol->getName()] = true;
        }

        $foreignCols = [];
        foreach ($this->getLocalColumn() as $colName) {
            if ($foreignPKCols[$lfmap[$colName]]) {
                $foreignCols[] = $foreignTable->getColumn($lfmap[$colName]);
            }
        }

        return $foreignCols;
    }
public function getForeignPrimaryKeys()
    {
        $lfmap = $this->getLocalForeignMapping();
        $foreignTable = $this->getForeignTable();

        $foreignPKCols = [];
        foreach ($foreignTable->getPrimaryKey() as $fPKCol) {
            $foreignPKCols[$fPKCol->getName()] = true;
        }

        $foreignCols = [];
        foreach ($this->getLocalColumn() as $colName) {
            if ($foreignPKCols[$lfmap[$colName]]) {
                $foreignCols[] = $foreignTable->getColumn($lfmap[$colName]);
            }
        }

        return $foreignCols;
    }
public function getForeignPrimaryKeys ( ) { $ lfmap = $ this -> getLocalForeignMapping ( ) ; $ foreignTable = $ this -> getForeignTable ( ) ; $ foreignPKCols = [ ] ; foreach ( $ foreignTable -> getPrimaryKey ( ) as $ fPKCol ) { $ foreignPKCols [ $ fPKCol -> getName ( ) ] = true ; } $ foreignCols = [ ] ; foreach ( $ this -> getLocalColumn ( ) as $ colName ) { if ( $ foreignPKCols [ $ lfmap [ $ colName ] ] ) { $ foreignCols [ ] = $ foreignTable -> getColumn ( $ lfmap [ $ colName ] ) ; } } return $ foreignCols ; }
Returns all foreign columns which are also a primary key of the foreign table.

@return array Column[]
Returns all foreign columns which are also a primary key of the foreign table .