 <p>I'd say follow the <a href="http://en.wikipedia.org/wiki/Single_responsibility_principle" rel="nofollow noreferrer">Single Responsibility Principle</a>.</p> <p>What you have is a SportsCard that does nothing on itself. It's just a data container.</p> <pre><code>class SportsCard { protected $_price; protected $_sport; public function __construct($price, $sport) { $this-&gt;_price = $price; $this-&gt;_sport = $sport; } public function getPrice() { return $this-&gt;_price; } public function getSport() { return $this-&gt;_sport; } } </code></pre> <p>The SportsCards have to be stored in a CardBook. If you think about a CardBook, then it doesn't do much, except for storing SportsCards (not Pokemon or Magic The Gathering cards), so let's just make it do that:</p> <pre><code>class CardBook extends SplObjectStorage { public function attach($card) { if ($card instanceof SportsCard) { parent::attach($card); } return $this; } public function detach($card) { parent::detach($card); } } </code></pre> <p>While there is nothing wrong with adding Finder Methods to the SportsCard set, you do not want the finder method's logic inside it as well. It is fine as long as you only have</p> <pre><code>public function findByPrice($min, $max); public function findBySport($sport); </code></pre> <p>But the second you also add</p> <pre><code>public function findByPriceAndSport($sport, $min, $max); </code></pre> <p>you will either duplicate code or iterate over the collection twice. Fortunately, PHP offers an elegant solution for filtering collections with Iterators, so let's put the responsibility for filtering into separate classes as well:</p> <pre><code>abstract class CardBookFilterIterator extends FilterIterator { public function __construct($cardBook) { if ($cardBook instanceof CardBook || $cardBook instanceof self) { parent::__construct($cardBook); } else { throw new InvalidArgumentException( 'Expected CardBook or CardBookFilterIterator'); } } } </code></pre> <p>This class merely makes sure the child classes accept only children of itself or CardBooks. This is important because we are accessing methods from SportsCard in actual filters later and because CardBooks can contain only SportsCards, we make sure the iterated elements provide these methods. But let's look at a concrete Filter:</p> <pre><code>class SportCardsBySportFilter extends CardBookFilterIterator { protected $sport = NULL; public function filterBySport($sport) { $this-&gt;_sport = $sport; return $this; } public function accept() { return $this-&gt;current()-&gt;getSport() === $this-&gt;_sport; } } </code></pre> <p>FilterIterators work by extending the class and modifying it's accept() method with custom logic. If the method does not return FALSE, the currently iterated item is allowed to pass the filter. Iterators can be stacked, so you add Filter on Filter on top, each caring only for a single piece of filtering, which makes this very maintainable and extensible. Here is the second filter:</p> <pre><code>class SportCardsByPriceFilter extends CardBookFilterIterator { protected $min; protected $max; public function filterByPrice($min = 0, $max = PHP_INT_MAX) { $this-&gt;_min = $min; $this-&gt;_max = $max; return $this; } public function accept() { return $this-&gt;current()-&gt;getPrice() &gt; $this-&gt;_min &amp;&amp; $this-&gt;current()-&gt;getPrice() &lt; $this-&gt;_max; } } </code></pre> <p>No magic here. Just the accept method and the setter for the criteria. Now, to assemble it:</p> <pre><code>$cardBook = new CardBook; $cardBook-&gt;attach(new SportsCard('10', 'Baseball')) -&gt;attach(new SportsCard('40', 'Basketball')) -&gt;attach(new SportsCard('50', 'Soccer')) -&gt;attach(new SportsCard('20', 'Rugby')) -&gt;attach(new SportsCard('30', 'Baseball')); $filteredCardBook = new SportCardsBySportFilter($cardBook); $filteredCardBook-&gt;setFilterBySport('Baseball'); $filteredCardBook = new SportCardsByPriceFilter($filteredCardBook); $filteredCardBook-&gt;filterByPrice(20); print_r( iterator_to_array($filteredCardBook) ); </code></pre> <p>And this will give:</p> <pre><code>Array ( [4] =&gt; SportsCard Object ( [_price:protected] =&gt; 30 [_sport:protected] =&gt; Baseball ) ) </code></pre> <p>Combining filters from inside the CardBook is a breeze now. No Code duplication or double iteration anymore. Whether you keep the Finder Methods inside the CardBook or in a CardBookFinder that you can pass CardBooks into is up to you.</p> <pre><code>class CardBookFinder { protected $_filterSet; protected $_cardBook; public function __construct(CardBook $cardBook) { $this-&gt;_cardBook = $this-&gt;_filterSet = $cardBook; } public function getFilterSet() { return $this-&gt;_filterSet; } public function resetFilterSet() { return $this-&gt;_filterSet = $this-&gt;_cardBook; } </code></pre> <p>These methods just make sure you can start new FilterSets and that you have a CardBook inside the Finder before using one of the finder methods:</p> <pre><code> public function findBySport($sport) { $this-&gt;_filterSet = new SportCardsBySportFilter($this-&gt;getFilterSet()); $this-&gt;_filterSet-&gt;filterBySport($sport); return $this-&gt;_filterSet; } public function findByPrice($min, $max) { $this-&gt;_filterSet = new SportCardsByPriceFilter($this-&gt;getFilterSet()); $this-&gt;_filterSet-&gt;filterByPrice(20); return $this-&gt;_filterSet; } public function findBySportAndPrice($sport, $min, $max) { $this-&gt;findBySport($sport); $this-&gt;_filterSet = $this-&gt;findByPrice($min, $max); return $this-&gt;_filterSet; } public function countBySportAndPrice($sport, $min, $max) { return iterator_count( $this-&gt;findBySportAndPrice($sport, $min, $max)); } } </code></pre> <p>And there you go</p> <pre><code>$cardBookFinder = new CardBookFinder($cardBook); echo $cardBookFinder-&gt;countBySportAndPrice('Baseball', 20, 100); $cardBookFinder-&gt;resetFilterSet(); foreach($cardBookFinder-&gt;findBySport('Baseball') as $card) { echo "{$card-&gt;getSport()} - {$card-&gt;getPrice()}"; } </code></pre> <p>Feel free to adapt and improve for your own CardBook.</p>