protected function hasBindingsWithTypeNameThatMatch($typeName, Expression $expr)
{
if (!$this->hasBindingsWithTypeName($typeName)) {
return false;
}
$key = $this->keysByTypeName[$typeName];
if (!isset($this->bindingsByKey[$key])) {
$this->loadBindingsForKey($key);
}
foreach ($this->bindingsByKey[$key] as $binding) {
if ($expr->evaluate($binding)) {
return true;
}
}
return false;
}