public function belongsToOne($model, $thisKey = null, $parentKey = null)
	{
		$parent = $this->resolve($model);

		// Default the keys if not set
		$thisKey   = $thisKey   ?: strtolower($parent->getModelName()) . '_id';
		$parentKey = $parentKey ?: $this->getPrimaryKey();

		return new BelongsToOne($this, $parent, $thisKey, $parentKey);
	}
public function belongsToOne($model, $thisKey = null, $parentKey = null)
	{
		$parent = $this->resolve($model);

		// Default the keys if not set
		$thisKey   = $thisKey   ?: strtolower($parent->getModelName()) . '_id';
		$parentKey = $parentKey ?: $this->getPrimaryKey();

		return new BelongsToOne($this, $parent, $thisKey, $parentKey);
	}
public function belongsToOne ( $ model , $ thisKey = null , $ parentKey = null ) { $ parent = $ this -> resolve ( $ model ) ; // Default the keys if not set $ thisKey = $ thisKey ? : strtolower ( $ parent -> getModelName ( ) ) . '_id' ; $ parentKey = $ parentKey ? : $ this -> getPrimaryKey ( ) ; return new BelongsToOne ( $ this , $ parent , $ thisKey , $ parentKey ) ; }
Retrieves a belongs to one model relationship

@param   string       $model      The name of the model to relate to the current one
@param   string|null  $thisKey    The local key used to associate the many back to the model
@param   string|null  $parentKey  The parent key used to associate the model to its parent
@return  \Hubzero\Database\Relationship\BelongsToOne
@since   2.0.0
Retrieves a belongs to one model relationship