public static function belongsTo($modelClass, $columnName, $options = []) {
        $options['type'] = self::BELONGS_TO;
        $options['modelClass'] = $modelClass;
        $options['compares'] = [[(false === strpos($columnName, '.')) ? "t.$columnName" : $columnName, "r." . $modelClass::getDb()->getTablePk($modelClass::getTableName()), "="]];
        return new self($options);
    }
public static function belongsTo($modelClass, $columnName, $options = []) {
        $options['type'] = self::BELONGS_TO;
        $options['modelClass'] = $modelClass;
        $options['compares'] = [[(false === strpos($columnName, '.')) ? "t.$columnName" : $columnName, "r." . $modelClass::getDb()->getTablePk($modelClass::getTableName()), "="]];
        return new self($options);
    }
public static function belongsTo ( $ modelClass , $ columnName , $ options = [ ] ) { $ options [ 'type' ] = self :: BELONGS_TO ; $ options [ 'modelClass' ] = $ modelClass ; $ options [ 'compares' ] = [ [ ( false === strpos ( $ columnName , '.' ) ) ? "t.$columnName" : $ columnName , "r." . $ modelClass :: getDb ( ) -> getTablePk ( $ modelClass :: getTableName ( ) ) , "=" ] ] ; return new self ( $ options ) ; }
Create's a belongsTo relation
@param string $modelClass
@param string $columnName
@param array $options
@return Relation
Create s a belongsTo relation