Skip to content

Commit

Permalink
Merge pull request #95 from xr1337/master
Browse files Browse the repository at this point in the history
Small Change to allow objectForKeyedSubscript for ComponentFactory.
  • Loading branch information
jasperblues committed Nov 8, 2013
2 parents 8cbdece + 30efd8d commit 29b80f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Factory/TyphoonComponentFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ - (void)register:(TyphoonDefinition*)definition
}
}

- (id)objectForKeyedSubscript:(id)key
{
if ([key isKindOfClass:[NSString class]])
{
return [self componentForKey:key];
}
return [self componentForType:key];
}

- (id)componentForType:(id)classOrProtocol
{
if (![self isLoaded])
Expand Down

0 comments on commit 29b80f2

Please sign in to comment.