/**
* {@inheritdoc}
*/
public function filter(OptionsInterface $options, $value)
{
if (is_string($value)) {
$value = Factory::get($value);
$this->setProcessors($options, $value);
} elseif (!$value instanceof ProfileInterface) {
throw new InvalidArgumentException('Invalid value for the profile option.');
}
return $value;
}