-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
*/ | ||
public function chainInputFilter(BaseInputFilter $inputFilter) | ||
{ | ||
foreach ($inputFilter->getInputs() as $name=>$input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting issue, missing space around =>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed and committed
On 12 Jul 2014 12:54 PM, "Aleksey Khudyakov" [email protected]
wrote:
In library/Zend/InputFilter/InputFilter.php:
@@ -62,4 +62,17 @@ public function add($input, $name = null)
}
return parent::add($input, $name);
}
+
- /**
\* Chain one InputFilter into the current one
\* @param BaseInputFilter $inputFilter
\* @return $this
*/
- public function chainInputFilter(BaseInputFilter $inputFilter)
- {
foreach ($inputFilter->getInputs() as $name=>$input) {
formatting issue, missing space around =>
—
Reply to this email directly or view it on GitHub
https://github.com/zendframework/zf2/pull/6431/files#r14852944.
Moved the input filter to the base class as per suggestion |
@@ -62,4 +62,5 @@ public function add($input, $name = null) | |||
} | |||
return parent::add($input, $name); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
Is anything further going to happen with this after I have implemented the suggested changes? |
@@ -60,6 +60,6 @@ public function add($input, $name = null) | |||
$factory = $this->getFactory(); | |||
$input = $factory->createInput($input); | |||
} | |||
return parent::add($input, $name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this change
Updated, my bad, misread your comment :) |
foreach ($inputFilter->getInputs() as $name => $input) { | ||
$this->add($input, $name); | ||
} | ||
return $this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fluent interface should not be provided, especially on new APIs
@brettminnie could you rebase your PR and do a force-push to get rid of all the other commits clogging up the view? Two questions:
Ideally I'd also like to see it added to And, one last thing (I swear :P)...could you update the ticket title to say "merge" instead of "chain"...the latter has an incorrect connotation in this context. Thanks! |
@brettminnie this was merged into Thanks! |
@Ocramius many thanks, about to open a pull request on the documentation side will reference it here when done |
Documentation pr opened zendframework/zf2-documentation#1398 |
Documentation for zendframework/zendframework#6431
…nd cleaning up test logic for readability
…erge-support' into develop Close zendframework/zendframework#6431
Needed a clean way to chain input filters together