Skip to content

Commit

Permalink
take an object
Browse files Browse the repository at this point in the history
  • Loading branch information
henderjon authored Jul 12, 2016
1 parent ffad79e commit 305e322
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Router/AbstractRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ protected function parseRequest($path){
* @inheritdoc
*/
public function generate($controller, $action = null, $format = null, array $options = []){
if(is_object($controller)){
$controller = get_class($controller);
}

return $this->generateFromRoute(new Route($controller, $action, $format, $options));
}

Expand Down

0 comments on commit 305e322

Please sign in to comment.