public getRelation ( string $modelName ) : |
||
$modelName | string | |
return |
public function getRelation($modelName)
{
$relations = $this->getRelations($modelName);
if (!empty($relations)) {
return current($relations);
} else {
return false;
}
}
/** * @expectedException Bluz\Db\Exception\RelationNotFoundException */ public function testGetRelationException() { $this->row->getRelation('wrongRelation'); }