protected function convertEntityResourceMatcher($entityType, $resourceMatcher)
{
$newMatcher = 'isType("' . $entityType . '")';
if (trim($resourceMatcher) !== 'ANY') {
$newMatcher .= ' && ' . preg_replace(array('/\\bcurrent\\./', '/\\bthis\\.([^\\s]+)/'), array('context.', 'property("$1")'), $resourceMatcher);
}
return $newMatcher;
}