owncloud/core — pull request #8566 by Raydiation (2014-05-13 08:45:48+00:00)
Title: Allow setting of controller default method values through normal PHP default values

While trying to start porting yesterday I ran into the problem I ran into the problem that I wanted to get rid of

```php
public function index() {
$batchSize = (int) $this->params('batchSize', 20);
}
```

where 20 is the default parameter if nothing is passed. This pull request lets you set the default parameter in the method signature:

```php
public function index($batchSize=20) {
}
```

The nice thing is that it works by key and not by position, so the following is possble:
**GET /url?param1=hi¶m4=2**
```php
public function index($param1, $param2 $param3=20, $param4=5) {
// $param1 = 'hi'
// $param2 = null
// $param3 = 20
// $param4 = 2
}
```

@DeepDiver1975 @LEDfan @Kondou-ger @MorrisJobke @DeepDiver1975