src/xPDO/Om/xPDOObject.php
public function getFKClass($k) {
        $fkclass= null;
        $k = $this->getField($k, true);
        if (is_string($k)) {
            if (!empty ($this->_aggregates)) {
                foreach ($this->_aggregates as $aggregateAlias => $aggregate) {
                    if ($aggregate['local'] === $k) {
                        $fkclass= $aggregate['class'];
                        break;
                    }
                }
            }
            if (!$fkclass && !empty ($this->_composites)) {
                foreach ($this->_composites as $compositeAlias => $composite) {
                    if ($composite['local'] === $k) {
                        $fkclass= $composite['class'];
                        break;
                    }
                }
            }
            $fkclass= $this->xpdo->loadClass($fkclass);
        }
        if ($this->xpdo->getDebug() === true) $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Returning foreign key class {$fkclass} for column {$k}");
        return $fkclass;
    }
public function getFKClass($k) {
        $fkclass= null;
        $k = $this->getField($k, true);
        if (is_string($k)) {
            if (!empty ($this->_aggregates)) {
                foreach ($this->_aggregates as $aggregateAlias => $aggregate) {
                    if ($aggregate['local'] === $k) {
                        $fkclass= $aggregate['class'];
                        break;
                    }
                }
            }
            if (!$fkclass && !empty ($this->_composites)) {
                foreach ($this->_composites as $compositeAlias => $composite) {
                    if ($composite['local'] === $k) {
                        $fkclass= $composite['class'];
                        break;
                    }
                }
            }
            $fkclass= $this->xpdo->loadClass($fkclass);
        }
        if ($this->xpdo->getDebug() === true) $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Returning foreign key class {$fkclass} for column {$k}");
        return $fkclass;
    }
public function getFKClass ( $ k ) { $ fkclass = null ; $ k = $ this -> getField ( $ k , true ) ; if ( is_string ( $ k ) ) { if ( ! empty ( $ this -> _aggregates ) ) { foreach ( $ this -> _aggregates as $ aggregateAlias => $ aggregate ) { if ( $ aggregate [ 'local' ] === $ k ) { $ fkclass = $ aggregate [ 'class' ] ; break ; } } } if ( ! $ fkclass && ! empty ( $ this -> _composites ) ) { foreach ( $ this -> _composites as $ compositeAlias => $ composite ) { if ( $ composite [ 'local' ] === $ k ) { $ fkclass = $ composite [ 'class' ] ; break ; } } } $ fkclass = $ this -> xpdo -> loadClass ( $ fkclass ) ; } if ( $ this -> xpdo -> getDebug ( ) === true ) $ this -> xpdo -> log ( xPDO :: LOG_LEVEL_DEBUG , "Returning foreign key class {$fkclass} for column {$k}" ) ; return $ fkclass ; }
Get the name of a class related by foreign key to a specified field key.

This is generally used to lookup classes involved in one-to-one
relationships with the current object.

@param string $k The field name or key to lookup a related class for.
@return bool|null|string
Get the name of a class related by foreign key to a specified field key .