private function _matches($match, $against)
{
$is_match = TRUE;
$match = $this->EE->security->entity_decode($match);
if (!is_array($against)) {
$against = array($against);
} else {
// remove null values
$against = array_filter($against, 'strlen');
}
// check every value in the array matches
foreach ($against as $part) {
// convert placeholder null to an empty string before comparing
if ($part === $this->_list_null) {
$part = '';
}
$this->EE->TMPL->log_item('Stash: MATCH ' . $match . ' AGAINST ' . $part);
if (!preg_match($match, $part)) {
$is_match = FALSE;
break;
}
}
return $is_match;
}