public function __construct(RequestInterface $request, Sender $sender, array $options = array(), MessageFactory $messageFactory) { foreach ($options as $name => $value) { if (property_exists($this, $name)) { $this->{$name} = $value; } } $this->request = $request; $this->sender = $sender; $this->messageFactory = $messageFactory; }