src/Titon/Model/Model.php
public function belongsTo($alias, $class, $foreignKey = null, Closure $conditions = null) {
        $relation = (new ManyToOne($alias, $class))
            ->setPrimaryForeignKey($foreignKey);

        if ($conditions) {
            $relation->setConditions($conditions);
        }

        return $this->addRelation($relation);
    }
public function belongsTo($alias, $class, $foreignKey = null, Closure $conditions = null) {
        $relation = (new ManyToOne($alias, $class))
            ->setPrimaryForeignKey($foreignKey);

        if ($conditions) {
            $relation->setConditions($conditions);
        }

        return $this->addRelation($relation);
    }
public function belongsTo ( $ alias , $ class , $ foreignKey = null , Closure $ conditions = null ) { $ relation = ( new ManyToOne ( $ alias , $ class ) ) -> setPrimaryForeignKey ( $ foreignKey ) ; if ( $ conditions ) { $ relation -> setConditions ( $ conditions ) ; } return $ this -> addRelation ( $ relation ) ; }
Add a many-to-one relationship.

@param string $alias
@param string $class
@param string $foreignKey
@param \Closure $conditions
@return $this
Add a many - to - one relationship .