Development + bugfixes

This commit is contained in:
Simon Sessingø
2016-11-15 03:43:26 +01:00
parent 6de0700e17
commit d5e7a13d89
20 changed files with 472 additions and 388 deletions
+3 -2
View File
@@ -10,9 +10,10 @@ class InputCollection implements \IteratorAggregate {
* Useful for searching for finding items where $index doesn't contain form name.
*
* @param string $index
* @param string|null $defaultValue
* @return mixed
*/
public function findFirst($index) {
public function findFirst($index, $defaultValue = null) {
if(count($this->data)) {
if(isset($this->data[$index])) {
@@ -26,7 +27,7 @@ class InputCollection implements \IteratorAggregate {
}
}
return null;
return $defaultValue;
}
/**