/** * Checks if the class provided matches against the filter * @param SCAR_Generic $klass * @return boolean **/ public function filterMatch($klass) { if (!$this->_filter) { return true; } $relation = $this->getRelation($this->_filter->getName()); $match = true; foreach ($relation['keys'] as $local_key => $foreign_key) { if ($this->_filter->{$foreign_key} != $klass->{$local_key}) { $match = false; } } return $match; }