| 1 | <?php |
||
| 12 | trait HasRouteCollectionTrait |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @inheritdoc |
||
| 17 | * @return RouteCollection |
||
| 18 | */ |
||
| 19 | 9 | public function getRouteCollection() |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param $name |
||
| 29 | * @return null|Route\Route |
||
| 30 | */ |
||
| 31 | 2 | public function getRoute($name) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return RouteCollection|Route[] |
||
| 38 | */ |
||
| 39 | 8 | public function getRoutes() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param $name |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public function connected($name) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param Route $route |
||
| 55 | */ |
||
| 56 | 1 | public function addRoute($route) |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @param string $name |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | public function hasRoute($name) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return RouteCollection |
||
| 72 | */ |
||
| 73 | 9 | protected function newRoutesCollection() |
|
| 77 | } |
||
| 78 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: