| 1 | <?php |
||
| 13 | class Match |
||
| 14 | { |
||
| 15 | public $uri; |
||
| 16 | public $name; |
||
| 17 | public $action; |
||
| 18 | public $method; |
||
| 19 | public $translation; |
||
| 20 | public $parameters; |
||
| 21 | public $response; |
||
| 22 | public $namespace; |
||
| 23 | public $controller; |
||
| 24 | |||
| 25 | public function __construct(Route $route = null, $method, $uri, $translation, array $parameters = array(), $name = null) |
||
| 34 | |||
| 35 | public function setNamespace($namespace) |
||
| 41 | |||
| 42 | public function setController($controller) |
||
| 48 | |||
| 49 | public function setAction($action) |
||
| 53 | |||
| 54 | public function getSegments() |
||
| 58 | } |
||
| 59 |
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: