protected function declareOneToOneRelationship(
        $sourceModelName,
        $targetModelName,
        $sourceColumnName,
        $targetColumnName,
        $navigationPropertyName = ""
    ) {

        $oneToOne = new OneToOne(
            $navigationPropertyName,
            $sourceModelName,
            $sourceColumnName,
            $targetModelName,
            $targetColumnName
        );

        $navigationPropertyName = ($navigationPropertyName) ? $navigationPropertyName : $targetModelName;

        $this->addRelationship(
            $sourceModelName,
            $navigationPropertyName,
            $oneToOne
        );

        return $oneToOne;
    }
protected function declareOneToOneRelationship(
        $sourceModelName,
        $targetModelName,
        $sourceColumnName,
        $targetColumnName,
        $navigationPropertyName = ""
    ) {

        $oneToOne = new OneToOne(
            $navigationPropertyName,
            $sourceModelName,
            $sourceColumnName,
            $targetModelName,
            $targetColumnName
        );

        $navigationPropertyName = ($navigationPropertyName) ? $navigationPropertyName : $targetModelName;

        $this->addRelationship(
            $sourceModelName,
            $navigationPropertyName,
            $oneToOne
        );

        return $oneToOne;
    }
protected function declareOneToOneRelationship ( $ sourceModelName , $ targetModelName , $ sourceColumnName , $ targetColumnName , $ navigationPropertyName = "" ) { $ oneToOne = new OneToOne ( $ navigationPropertyName , $ sourceModelName , $ sourceColumnName , $ targetModelName , $ targetColumnName ) ; $ navigationPropertyName = ( $ navigationPropertyName ) ? $ navigationPropertyName : $ targetModelName ; $ this -> addRelationship ( $ sourceModelName , $ navigationPropertyName , $ oneToOne ) ; return $ oneToOne ; }
Defines a one to one relationship from the source to the target model.

@param  string $sourceModelName
@param  string $targetModelName
@param  string $sourceColumnName
@param  string $navigationPropertyName
@param  string $targetColumnName
@return \Rhubarb\Stem\Schema\Relationships\OneToOne
Defines a one to one relationship from the source to the target model .