public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null)
{
if (!$value instanceof APISiteAccessLimitation) {
throw new InvalidArgumentException('$value', 'Must be of type: APISiteAccessLimitation');
}
if (!$object instanceof SiteAccess) {
throw new InvalidArgumentException('$object', 'Must be of type: SiteAccess');
}
if (empty($value->limitationValues)) {
return false;
}
if (empty($object->name)) {
return false;
}
$currentSiteAccessHash = $this->generateSiteAccessValue($object->name);
return in_array($currentSiteAccessHash, $value->limitationValues);
}