protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) { return in_array($attribute, array('foo', 'baz')); }