Skip to content

Commit ff71a6c

Browse files
committed
Merge pull request #165 from symfony-cmf/route-object-interface
better explain getRouteKey method
2 parents 88692f6 + 170a4c5 commit ff71a6c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

RouteObjectInterface.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,17 @@ interface RouteObjectInterface
6464
public function getContent();
6565

6666
/**
67-
* Get the route key.
67+
* Get the route name.
6868
*
69-
* This key will be used as route name instead of the name specified in the
70-
* route collection. There are no limitations to allowed characters in the
71-
* name.
69+
* Normal symfony routes do not know their name, the name is only known
70+
* from the route collection. In the CMF, it is possible to use route
71+
* documents outside of collections, and thus useful to have routes provide
72+
* their name.
7273
*
73-
* Return null if you want to use the default name.
74+
* There are no limitations to allowed characters in the name.
7475
*
75-
* @return string|null the route name
76+
* @return string|null the route name or null to use the default name
77+
* (e.g. from route collection if known)
7678
*/
7779
public function getRouteKey();
7880
}

0 commit comments

Comments
 (0)