_matchers = $matchers; } protected function matchesWithShortcut($item, $shortcut) { foreach ($this->_matchers as $matcher) { if ($matcher->matches($item) == $shortcut) { return $shortcut; } } return !$shortcut; } public function describeToWithOperator(Hamcrest_Description $description, $operator) { $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); } }