Added hasName method
Updated doc block for hasName
Update Router.php

Cleaned up method using @KennedyTedesco's suggestion.
Merge pull request #4792 from Garbee/4.2-hasname

Added hasName method