Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'inputfilter/merge' of https://github.com/bakura10/zf2 i…
Browse files Browse the repository at this point in the history
…nto feature/input-merging
  • Loading branch information
weierophinney committed Jul 11, 2012
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/FilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,21 @@ public function attachByName($name, $options = array(), $priority = self::DEFAUL
return $this->attach($filter, $priority);
}

/**
* Merge the filter chain with the one given in parameter
*
* @param FilterChain $filterChain
* @return FilterChain
*/
public function merge(FilterChain $filterChain)
{
foreach ($filterChain->filters as $filter) {
$this->attach($filter);
}

return $this;
}

/**
* Get all the filters
*
Expand Down

0 comments on commit f48fa38

Please sign in to comment.