public function __construct(array $values)
{
if (!isset($values['name'])) {
throw new \InvalidArgumentException('You must define a "name" attribute for each SecureParam annotation.');
}
if (!isset($values['permissions'])) {
throw new \InvalidArgumentException('You must define a "permissions" attribute for each SecureParam annotation.');
}
$this->name = $values['name'];
$this->permissions = array_map('trim', explode(',', $values['permissions']));
}