public function type() {
		if($this->get('relation_type'))
			return $this->get('relation_type');
		elseif($this->get('poymorphic'))
			throw new \Exception('Parameter relation_type must be provided for polymorphic relations.');

		$rev = $this->reverse();

		if($this->get('many')) {
			if($rev->get('many'))
				return 'HMABT';
			else
				return 'hasMany';
		}
		else {
			if($rev->get('many'))
				return 'belongsTo';
			else
				return 'hasOne';
		}
	}
public function type() {
		if($this->get('relation_type'))
			return $this->get('relation_type');
		elseif($this->get('poymorphic'))
			throw new \Exception('Parameter relation_type must be provided for polymorphic relations.');

		$rev = $this->reverse();

		if($this->get('many')) {
			if($rev->get('many'))
				return 'HMABT';
			else
				return 'hasMany';
		}
		else {
			if($rev->get('many'))
				return 'belongsTo';
			else
				return 'hasOne';
		}
	}
public function type ( ) { if ( $ this -> get ( 'relation_type' ) ) return $ this -> get ( 'relation_type' ) ; elseif ( $ this -> get ( 'poymorphic' ) ) throw new \ Exception ( 'Parameter relation_type must be provided for polymorphic relations.' ) ; $ rev = $ this -> reverse ( ) ; if ( $ this -> get ( 'many' ) ) { if ( $ rev -> get ( 'many' ) ) return 'HMABT' ; else return 'hasMany' ; } else { if ( $ rev -> get ( 'many' ) ) return 'belongsTo' ; else return 'hasOne' ; } }
Get the relation type.
@return string hasOne, belongsTo, hasMany or HMABT
Get the relation type .